if connection is not activated, create a new one even sid is not 0

This commit is contained in:
jtao1735 2020-05-01 04:21:47 +00:00
parent 8be22be5ec
commit 66fcb8ab05
1 changed files with 3 additions and 2 deletions

View File

@ -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);