From 0775971fb43a9a9489ccdf862ccb838aa0a2f0b5 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 14 Jul 2022 14:50:21 +0800 Subject: [PATCH] fix(rpc): send probe check send condition --- src/client/src/tscServer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 79f8e94835..404b074f66 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -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(); -- GitLab