diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index fe1c45bd393938cfd9a77db97169dde2ef6412de..62ae2cd7098b74a5b5c9d024a116d1f47851c6cd 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 111b722f7666865e5d0c3a8b261bccc4030d025d..3295c130ddc6060b90338ce60948b4d8ee1297dc 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; + + if (pClientObj == NULL) return; - tDebug ("%s TCP client is stopped", pThreadObj->label); + tDebug ("%s TCP client is stopped", pClientObj->label); } void taosCleanUpTcpClient(void *chandle) {