Merge pull request #1766 from taosdata/hotfix/rpcSid

if connection is not activated, create a new one even sid is not 0
This commit is contained in:
slguan 2020-05-01 12:40:13 +08:00 committed by GitHub
commit f0bbe277ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);