diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index cb392649a2d28f93150041b706199f249ec26bd6..3e5854d08d7f2129cf96bc485060ef5440c150ca 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -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) { + taosCloseLog(); + rpcCleanup(); + } p = tscTmr; tscTmr = NULL; diff --git a/src/rpc/src/rpcTcp.c b/src/rpc/src/rpcTcp.c index 111b722f7666865e5d0c3a8b261bccc4030d025d..21608acd87a9ff6142a03ea5938779faa442a589 100644 --- a/src/rpc/src/rpcTcp.c +++ b/src/rpc/src/rpcTcp.c @@ -364,10 +364,10 @@ 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) {