diff --git a/source/util/src/tcache.c b/source/util/src/tcache.c index 14503e7068af8e5c0a57ac236057104e3f53d158..9dcbafca7a1b0a2e3dbc67e2bbec1231b9e0a6a1 100644 --- a/source/util/src/tcache.c +++ b/source/util/src/tcache.c @@ -911,7 +911,7 @@ void taosCacheRefresh(SCacheObj *pCacheObj, __cache_trav_fn_t fp, void *param1) void taosStopCacheRefreshWorker(void) { stopRefreshWorker = true; - taosThreadJoin(cacheRefreshWorker, NULL); + if(cacheThreadInit != PTHREAD_ONCE_INIT) taosThreadJoin(cacheRefreshWorker, NULL); taosArrayDestroy(pCacheArrayList); }