diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index f8957f6fd886a8d6a05d1aa78529f129f9f41cac..f6c473333cd463000238a26357c9c7bc728ba159 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -528,8 +528,12 @@ int hbRegisterConn(SAppHbMgr* pAppHbMgr, int32_t connId, int64_t clusterId, int3 } void hbDeregisterConn(SAppHbMgr* pAppHbMgr, SClientHbKey connKey) { - taosHashRemove(pAppHbMgr->activeInfo, &connKey, sizeof(SClientHbKey)); - taosHashRemove(pAppHbMgr->connInfo, &connKey, sizeof(SClientHbKey)); + int32_t code = 0; + code = taosHashRemove(pAppHbMgr->activeInfo, &connKey, sizeof(SClientHbKey)); + code = taosHashRemove(pAppHbMgr->connInfo, &connKey, sizeof(SClientHbKey)); + if (code) { + return; + } atomic_sub_fetch_32(&pAppHbMgr->connKeyCnt, 1); if (atomic_load_32(&pAppHbMgr->connKeyCnt) <= 0) { appHbMgrCleanup(pAppHbMgr);