From fe29f000193f79977b79b45fe33194c988e1078c Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 15 Sep 2022 17:23:48 +0800 Subject: [PATCH] fix: fix deadlock --- source/client/src/clientHb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index a7e42a01a3..7ce80553a0 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -707,6 +707,7 @@ static void *hbThreadFunc(void *param) { int32_t connCnt = atomic_load_32(&pAppHbMgr->connKeyCnt); if (connCnt == 0) { + taosArrayPush(mgr, &pAppHbMgr); continue; } SClientHbBatchReq *pReq = hbGatherAllInfo(pAppHbMgr); @@ -720,6 +721,7 @@ static void *hbThreadFunc(void *param) { terrno = TSDB_CODE_TSC_OUT_OF_MEMORY; tFreeClientHbBatchReq(pReq); // hbClearReqInfo(pAppHbMgr); + taosArrayPush(mgr, &pAppHbMgr); break; } @@ -731,6 +733,7 @@ static void *hbThreadFunc(void *param) { tFreeClientHbBatchReq(pReq); // hbClearReqInfo(pAppHbMgr); taosMemoryFree(buf); + taosArrayPush(mgr, &pAppHbMgr); break; } pInfo->fp = hbAsyncCallBack; -- GitLab