diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index b5b99e92b07b155ab69a6d41f3d793ed697dab7f..07046eb04108f86e6dbb46ac053f35210a5d4c11 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -1402,8 +1402,6 @@ int32_t doProcessMsgFromServer(void* param) { tscError("0x%" PRIx64 " rsp msg:%s, code:%s rspLen:%d, elapsed time:%d ms, reqId:0x%" PRIx64, pRequest->self, TMSG_INFO(pMsg->msgType), tstrerror(pMsg->code), pMsg->contLen, elapsed / 1000, pRequest->requestId); } - - taosReleaseRef(clientReqRefPool, pSendInfo->requestObjRefId); } } @@ -1423,6 +1421,11 @@ int32_t doProcessMsgFromServer(void* param) { } pSendInfo->fp(pSendInfo->param, &buf, pMsg->code); + + if (pTscObj) { + taosReleaseRef(clientReqRefPool, pSendInfo->requestObjRefId); + } + rpcFreeCont(pMsg->pCont); destroySendMsgInfo(pSendInfo);