From 16f039a780b9f712fde8b4861e94f4b0f6ed7f27 Mon Sep 17 00:00:00 2001 From: kailixu Date: Sun, 23 Apr 2023 22:52:20 +0800 Subject: [PATCH] chore: code optimization --- source/client/inc/clientInt.h | 2 +- source/client/src/clientHb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/client/inc/clientInt.h b/source/client/inc/clientInt.h index c319a6ffa5..8e20d7d275 100644 --- a/source/client/inc/clientInt.h +++ b/source/client/inc/clientInt.h @@ -361,7 +361,7 @@ void stopAllRequests(SHashObj* pRequests); // conn level int hbRegisterConn(SAppHbMgr* pAppHbMgr, int64_t tscRefId, int64_t clusterId, int8_t connType); -void hbDeregisterConn(SAppHbMgr* pAppHbMgr, SClientHbKey connKey, void* connFp); +void hbDeregisterConn(SAppHbMgr* pAppHbMgr, SClientHbKey connKey, void* param); typedef struct SSqlCallbackWrapper { SParseContext* pParseCtx; diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index 08607b08ea..3b8739207c 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -1146,7 +1146,7 @@ int hbRegisterConn(SAppHbMgr *pAppHbMgr, int64_t tscRefId, int64_t clusterId, in } } -void hbDeregisterConn(SAppHbMgr *pAppHbMgr, SClientHbKey connKey, void *connFp) { +void hbDeregisterConn(SAppHbMgr *pAppHbMgr, SClientHbKey connKey, void *param) { SClientHbReq *pReq = taosHashAcquire(pAppHbMgr->activeInfo, &connKey, sizeof(SClientHbKey)); if (pReq) { tFreeClientHbReq(pReq); @@ -1159,7 +1159,7 @@ void hbDeregisterConn(SAppHbMgr *pAppHbMgr, SClientHbKey connKey, void *connFp) } atomic_sub_fetch_32(&pAppHbMgr->connKeyCnt, 1); - if (connFp) { + if (param) { atomic_sub_fetch_32(&pAppHbMgr->passKeyCnt, 1); } } -- GitLab