diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 69db734588dbd0ce860c547adf9c03834ba23bc4..3f183ef15f296fb7e1503c2630004e9ff1980fee 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -579,14 +579,15 @@ static void rpcReleaseConn(SRpcConn *pConn) { rpcFreeMsg(pConn->pRspMsg); // it may have a response msg saved, but not request msg } + tTrace("%s, rpc connection is released", pConn->info); + // lockedBy can not be reset, since it maybe hold by a thread int sid = pConn->sid; int64_t lockedBy = pConn->lockedBy; memset(pConn, 0, sizeof(SRpcConn)); pConn->lockedBy = lockedBy; + pConn->pRpc = pRpc; taosFreeId(pRpc->idPool, sid); - - tTrace("%s, rpc connection is released", pConn->info); } static void rpcCloseConn(void *thandle) {