From b6a733ee8abd5d4a3a801f59e541e6dc8d3342e6 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 30 Jan 2021 16:29:00 +0000 Subject: [PATCH] TD-2884 --- src/client/src/tscSystem.c | 8 +++++--- src/rpc/src/rpcTcp.c | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index fe1c45bd39..62ae2cd709 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -65,7 +65,7 @@ void tscReleaseRpc(void *param) { return; } pthread_mutex_lock(&rpcObjMutex); - taosCacheRelease(tscRpcCache, (void *)¶m, false); + taosCacheRelease(tscRpcCache, (void *)¶m, true); pthread_mutex_unlock(&rpcObjMutex); } @@ -216,7 +216,6 @@ void taos_cleanup(void) { taosCloseRef(id); taosCleanupKeywordsTable(); - taosCloseLog(); p = tscRpcCache; tscRpcCache = NULL; @@ -226,7 +225,10 @@ void taos_cleanup(void) { pthread_mutex_destroy(&rpcObjMutex); } - if (tscEmbedded == 0) rpcCleanup(); + if (tscEmbedded == 0) { + rpcCleanup(); + taosCloseLog(); + }; p = tscTmr; tscTmr = NULL; diff --git a/src/rpc/src/rpcTcp.c b/src/rpc/src/rpcTcp.c index 111b722f76..3295c130dd 100644 --- a/src/rpc/src/rpcTcp.c +++ b/src/rpc/src/rpcTcp.c @@ -364,10 +364,11 @@ void *taosInitTcpClient(uint32_t ip, uint16_t port, char *label, int numOfThread } void taosStopTcpClient(void *chandle) { - SThreadObj *pThreadObj = chandle; - if (pThreadObj == NULL) return; + SClientObj *pClientObj = chandle; - tDebug ("%s TCP client is stopped", pThreadObj->label); + if (pClientObj == NULL) return; + + tDebug ("%s TCP client is stopped", pClientObj->label); } void taosCleanUpTcpClient(void *chandle) {