From 66fcb8ab05132824ae0fecb705a46f022b6ae05c Mon Sep 17 00:00:00 2001 From: jtao1735 Date: Fri, 1 May 2020 04:21:47 +0000 Subject: [PATCH] if connection is not activated, create a new one even sid is not 0 --- src/rpc/src/rpcMain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index f616cd00b7..dfb549b3f9 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -643,10 +643,11 @@ static SRpcConn *rpcGetConnObj(SRpcInfo *pRpc, int sid, SRecvInfo *pRecv) { if (sid) { pConn = pRpc->connList + sid; - } else { - pConn = rpcAllocateServerConn(pRpc, pRecv); + if (pConn->user[0] == 0) pConn = NULL; } + if (pConn == NULL) pConn = rpcAllocateServerConn(pRpc, pRecv); + if (pConn) { if (pConn->linkUid != pHead->linkUid) { tTrace("%s %p, linkUid:0x%x not matched, received:0x%x", pRpc->label, pConn, pConn->linkUid, pHead->linkUid);