Merge pull request #2345 from taosdata/hotfix/rpcAssert
Hotfix/rpc assert
This commit is contained in:
commit
4ef4f60b50
|
@ -577,10 +577,12 @@ static void rpcReleaseConn(SRpcConn *pConn) {
|
||||||
rpcFreeMsg(pConn->pRspMsg); // it may have a response msg saved, but not request msg
|
rpcFreeMsg(pConn->pRspMsg); // it may have a response msg saved, but not request msg
|
||||||
}
|
}
|
||||||
|
|
||||||
taosFreeId(pRpc->idPool, pConn->sid);
|
// lockedBy can not be reset, since it maybe hold by a thread
|
||||||
|
int sid = pConn->sid;
|
||||||
int64_t lockedBy = pConn->lockedBy;
|
int64_t lockedBy = pConn->lockedBy;
|
||||||
memset(pConn, 0, sizeof(SRpcConn));
|
memset(pConn, 0, sizeof(SRpcConn));
|
||||||
pConn->lockedBy = lockedBy;
|
pConn->lockedBy = lockedBy;
|
||||||
|
taosFreeId(pRpc->idPool, sid);
|
||||||
|
|
||||||
tTrace("%s, rpc connection is released", pConn->info);
|
tTrace("%s, rpc connection is released", pConn->info);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue