fix(tsc):avoid invalid code
This commit is contained in:
parent
c577897c1f
commit
ac32abd39b
|
@ -274,13 +274,13 @@ static int32_t hbAsyncCallBack(void *param, SDataBuf *pMsg, int32_t code) {
|
||||||
SClientHbBatchRsp pRsp = {0};
|
SClientHbBatchRsp pRsp = {0};
|
||||||
if (TSDB_CODE_SUCCESS == code) {
|
if (TSDB_CODE_SUCCESS == code) {
|
||||||
tDeserializeSClientHbBatchRsp(pMsg->pData, pMsg->len, &pRsp);
|
tDeserializeSClientHbBatchRsp(pMsg->pData, pMsg->len, &pRsp);
|
||||||
}
|
|
||||||
|
|
||||||
int32_t now = taosGetTimestampSec();
|
int32_t now = taosGetTimestampSec();
|
||||||
int32_t delta = abs(now - pRsp.svrTimestamp);
|
int32_t delta = abs(now - pRsp.svrTimestamp);
|
||||||
if (delta > timestampDeltaLimit) {
|
if (delta > timestampDeltaLimit) {
|
||||||
code = TSDB_CODE_TIME_UNSYNCED;
|
code = TSDB_CODE_TIME_UNSYNCED;
|
||||||
tscError("time diff: %ds is too big", delta);
|
tscError("time diff: %ds is too big", delta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t rspNum = taosArrayGetSize(pRsp.rsps);
|
int32_t rspNum = taosArrayGetSize(pRsp.rsps);
|
||||||
|
|
Loading…
Reference in New Issue