From e14d11c78a445ec724ee50b24722bc0144ffa5fc Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 8 Jul 2024 14:28:27 +0800 Subject: [PATCH] fix:[TD-30915]tmq exit elegantly --- source/client/src/clientTmq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index c448f115bb..c9f567b890 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1063,7 +1063,6 @@ void tmqFreeImpl(void* handle) { taosArrayDestroyEx(tmq->clientTopics, freeClientVgImpl); taos_close_internal(tmq->pTscObj); - taosMemoryFree(tmq); if(tmq->commitTimer) { taosTmrStopA(tmq->commitTimer); @@ -1077,6 +1076,8 @@ void tmqFreeImpl(void* handle) { taosTmrStopA(tmq->hbLiveTimer); tmq->hbLiveTimer = NULL; } + taosMemoryFree(tmq); + tscDebug("consumer:0x%" PRIx64 " closed", id); }