diff --git a/src/tsdb/src/tsdbCommitQueue.c b/src/tsdb/src/tsdbCommitQueue.c index 9812b8fd5c03db3fd138cd938734fe043e6ddf2e..4fdd99dddabaf332bf0ffe1bba6dd963fc27361b 100644 --- a/src/tsdb/src/tsdbCommitQueue.c +++ b/src/tsdb/src/tsdbCommitQueue.c @@ -125,7 +125,7 @@ static void *tsdbLoopCommit(void *arg) { while (true) { pNode = tdListPopHead(pQueue->queue); if (pNode == NULL) { - if (pQueue->stop && pQueue->refCount == 0) { + if (pQueue->stop && pQueue->refCount <= 0) { pthread_mutex_unlock(&(pQueue->lock)); goto _exit; } else {