feat: add time unsynced check
This commit is contained in:
parent
35e8ad2811
commit
8006ee1d8e
|
@ -57,7 +57,7 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
|||
int32_t delta = abs(now - connectRsp.svrTimestamp);
|
||||
if (delta > timestampDeltaLimit) {
|
||||
code = TSDB_CODE_TIME_UNSYNCED;
|
||||
tscError("time diff: %" PRId64 "ms is too big", delta);
|
||||
tscError("time diff:%ds is too big", delta);
|
||||
taosMemoryFree(pMsg->pData);
|
||||
setErrno(pRequest, code);
|
||||
tsem_post(&pRequest->body.rspSem);
|
||||
|
|
|
@ -624,7 +624,7 @@ static int32_t mndProcessHeartBeatReq(SRpcMsg *pReq) {
|
|||
}
|
||||
|
||||
SClientHbBatchRsp batchRsp = {0};
|
||||
batchRsp.svrTimestamp = taosGetTimestampMs();
|
||||
batchRsp.svrTimestamp = taosGetTimestampSec();
|
||||
batchRsp.rsps = taosArrayInit(0, sizeof(SClientHbRsp));
|
||||
|
||||
int32_t sz = taosArrayGetSize(batchReq.reqs);
|
||||
|
|
Loading…
Reference in New Issue