diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 0a790e5a8c..c4000534da 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -309,7 +309,7 @@ void stopAllRequests(SHashObj *pRequests) { } void destroyAppInst(void *info) { - SAppInstInfo* pAppInfo = (SAppInstInfo*)info; + SAppInstInfo* pAppInfo = *(SAppInstInfo**)info; tscDebug("destroy app inst mgr %p", pAppInfo); taosThreadMutexLock(&appInfo.mutex); diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 521eb02a24..5492a8e32b 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -147,7 +147,7 @@ STscObj* taos_connect_internal(const char* ip, const char* user, const char* pas } p->pAppHbMgr = appHbMgrInit(p, key); if (NULL == p->pAppHbMgr) { - destroyAppInst(p); + destroyAppInst(&p); taosThreadMutexUnlock(&appInfo.mutex); taosMemoryFreeClear(key); return NULL; diff --git a/source/client/src/clientMonitor.c b/source/client/src/clientMonitor.c index 86e4da4517..1273a7546a 100644 --- a/source/client/src/clientMonitor.c +++ b/source/client/src/clientMonitor.c @@ -28,16 +28,16 @@ static int32_t getSlowLogTmpDir(char* tmpPath, int32_t size){ return 0; } -static void destroyCounter(void* data){ - if (data == NULL) { - return; - } - taos_counter_t* conuter = *(taos_counter_t**)data; - if(conuter == NULL){ - return; - } - taos_counter_destroy(conuter); -} +//static void destroyCounter(void* data){ +// if (data == NULL) { +// return; +// } +// taos_counter_t* conuter = *(taos_counter_t**)data; +// if(conuter == NULL){ +// return; +// } +// taos_counter_destroy(conuter); +//} static void destroyClientFile(void* data){ if (data == NULL) { @@ -61,7 +61,7 @@ static void destroyMonitorClient(void* data){ } taosHashCleanup(pMonitor->counters); taos_collector_registry_destroy(pMonitor->registry); - taos_collector_destroy(pMonitor->colector); +// taos_collector_destroy(pMonitor->colector); taosMemoryFree(pMonitor); } @@ -405,7 +405,7 @@ void monitorCreateClient(int64_t clusterId) { uError("failed to create monitor counters"); goto fail; } - taosHashSetFreeFp(pMonitor->counters, destroyCounter); +// taosHashSetFreeFp(pMonitor->counters, destroyCounter); if(taosHashPut(monitorCounterHash, &clusterId, LONG_BYTES, &pMonitor, POINTER_BYTES) != 0){ uError("failed to put monitor client to hash"); @@ -606,7 +606,7 @@ void* monitorThreadFunc(void *param){ } monitorFreeSlowLogData(slowLogData); taosFreeQitem(slowLogData); - tsem2_wait(&monitorSem); + tsem2_timewait(&monitorSem, 500); } taosCloseQueue(monitorQueue);