提交 0775971f 编写于 作者: A Alex Duan

fix(rpc): send probe check send condition

上级 2652d782
......@@ -293,6 +293,11 @@ bool sendProbeConnMsg(SSqlObj* pSql) {
// check time out
int32_t probeTimeout = 60*1000; // over this value send probe msg
int32_t killTimeout = 3*60*1000; // over this value query can be killed
if(pSql->stime == 0) {
// not start , no need probe
return true;
}
int64_t stime = MAX(pSql->stime, pSql->lastAlive);
int32_t diff = (int32_t)(taosGetTimestampMs() - stime);
if (diff < probeTimeout) {
......@@ -311,6 +316,11 @@ bool sendProbeConnMsg(SSqlObj* pSql) {
return true;
}
if(pSql->rpcRid == -1) {
// cancel or reponse ok from server, so need not probe
return true;
}
// It's long time from lastAlive, so need probe
pSql->noAckCnt++;
pSql->lastProbe = taosGetTimestampMs();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册