chore: more code
This commit is contained in:
parent
5d4bc82e17
commit
8513a30bfc
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue