parent
16782bff86
commit
8ebbfedba7
|
@ -20,6 +20,7 @@
|
|||
#include "tcache.h"
|
||||
#include "tnote.h"
|
||||
#include "trpc.h"
|
||||
#include "ttimer.h"
|
||||
#include "tscLog.h"
|
||||
#include "tscSubquery.h"
|
||||
#include "tscUtil.h"
|
||||
|
@ -260,6 +261,9 @@ void taos_close(TAOS *taos) {
|
|||
return;
|
||||
}
|
||||
|
||||
pObj->signature = NULL;
|
||||
taosTmrStopA(&(pObj->pTimer));
|
||||
|
||||
SSqlObj* pHb = pObj->pHb;
|
||||
if (pHb != NULL && atomic_val_compare_exchange_ptr(&pObj->pHb, pHb, 0) == pHb) {
|
||||
if (pHb->pRpcCtx != NULL) { // wait for rsp from dnode
|
||||
|
|
|
@ -542,10 +542,7 @@ void rpcCancelRequest(void *handle) {
|
|||
|
||||
if (pContext->pConn) {
|
||||
tDebug("%s, app tries to cancel request", pContext->pConn->info);
|
||||
pContext->pConn->pReqMsg = NULL;
|
||||
rpcCloseConn(pContext->pConn);
|
||||
pContext->pConn = NULL;
|
||||
rpcFreeCont(pContext->pCont);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -613,8 +610,10 @@ static void rpcReleaseConn(SRpcConn *pConn) {
|
|||
if (pConn->pReqMsg) rpcFreeCont(pConn->pReqMsg); // do not use rpcFreeMsg
|
||||
} else {
|
||||
// if there is an outgoing message, free it
|
||||
if (pConn->outType && pConn->pReqMsg)
|
||||
if (pConn->outType && pConn->pReqMsg) {
|
||||
if (pConn->pContext) pConn->pContext->pConn = NULL;
|
||||
rpcFreeMsg(pConn->pReqMsg);
|
||||
}
|
||||
}
|
||||
|
||||
// memset could not be used, since lockeBy can not be reset
|
||||
|
|
|
@ -525,7 +525,7 @@ static void *taosProcessTcpData(void *param) {
|
|||
while (pThreadObj->pHead) {
|
||||
SFdObj *pFdObj = pThreadObj->pHead;
|
||||
pThreadObj->pHead = pFdObj->next;
|
||||
taosFreeFdObj(pFdObj);
|
||||
taosReportBrokenLink(pFdObj);
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&(pThreadObj->mutex));
|
||||
|
|
Loading…
Reference in New Issue