From 8513a30bfc234e39951802e0a15ac23856181cd2 Mon Sep 17 00:00:00 2001 From: kailixu Date: Sun, 23 Apr 2023 20:01:46 +0800 Subject: [PATCH] chore: more code --- source/client/inc/clientInt.h | 2 +- source/client/src/clientHb.c | 7 ++++--- source/client/src/clientMain.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/client/inc/clientInt.h b/source/client/inc/clientInt.h index 1df032c498..211b47b49c 100644 --- a/source/client/inc/clientInt.h +++ b/source/client/inc/clientInt.h @@ -63,7 +63,7 @@ typedef struct { // statistics int32_t reportCnt; int32_t connKeyCnt; - int32_t nPassVerCb; + int32_t passKeyCnt; // with passVer call back int64_t reportBytes; // not implemented int64_t startTime; // ctl diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index 473d7c2e7d..277f74c77d 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -68,6 +68,7 @@ static int32_t hbProcessUserPassInfoRsp(void *value, int32_t valueLen, SClientHb } SPassInfo *passInfo = &pTscObj->passInfo; if (!passInfo->fp) { + releaseTscObj(pReq->connKey.tscRid); continue; } @@ -770,11 +771,11 @@ SClientHbBatchReq *hbGatherAllInfo(SAppHbMgr *pAppHbMgr) { return NULL; } - int32_t nPassVerCb = atomic_load_32(&pAppHbMgr->nPassVerCb); + int32_t passKeyCnt = atomic_load_32(&pAppHbMgr->passKeyCnt); while (pIter != NULL) { pOneReq = taosArrayPush(pBatchReq->reqs, pOneReq); code = (*clientHbMgr.reqHandle[pOneReq->connKey.connType])(&pOneReq->connKey, &pOneReq->clusterId, pOneReq, - nPassVerCb); + passKeyCnt); break; #if 0 @@ -1142,6 +1143,6 @@ void hbDeregisterConn(SAppHbMgr *pAppHbMgr, SClientHbKey connKey, void *connFp) atomic_sub_fetch_32(&pAppHbMgr->connKeyCnt, 1); if (connFp) { - atomic_sub_fetch_32(&pAppHbMgr->nPassVerCb, 1); + atomic_sub_fetch_32(&pAppHbMgr->passKeyCnt, 1); } } diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 3f29249e52..aed11b4fb1 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -137,7 +137,7 @@ int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type) pObj->passInfo.fp = fp; pObj->passInfo.param = param; if (fp) { - atomic_add_fetch_32(&pObj->pAppInfo->pAppHbMgr->nPassVerCb, 1); + atomic_add_fetch_32(&pObj->pAppInfo->pAppHbMgr->passKeyCnt, 1); } break; } -- GitLab