From e6764af48f0a2cd33e98a2ee5c6feecf7c5cdf84 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 8 Apr 2024 11:12:18 +0800 Subject: [PATCH] fix: heartbeat error handling issue --- source/client/src/clientHb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index a146712cab..b1f0ea55d8 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -496,6 +496,11 @@ static int32_t hbAsyncCallBack(void *param, SDataBuf *pMsg, int32_t code) { if (code != 0) { pInst->onlineDnodes = pInst->totalDnodes ? 0 : -1; tscDebug("hb rsp error %s, update server status %d/%d", tstrerror(code), pInst->onlineDnodes, pInst->totalDnodes); + taosThreadMutexUnlock(&clientHbMgr.lock); + taosMemoryFree(pMsg->pData); + taosMemoryFree(pMsg->pEpSet); + tFreeClientHbBatchRsp(&pRsp); + return -1; } if (rspNum) {