free ID in the last step
This commit is contained in:
parent
fa8af0d996
commit
a615527835
|
@ -576,11 +576,12 @@ static void rpcReleaseConn(SRpcConn *pConn) {
|
||||||
taosHashRemove(pRpc->hash, hashstr, size);
|
taosHashRemove(pRpc->hash, hashstr, size);
|
||||||
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);
|
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