chore: code optimization

This commit is contained in:
kailixu 2023-04-23 22:52:20 +08:00
parent dff62bdccd
commit 16f039a780
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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);
}
}