diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 9d6a69019f..da42b54255 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -2395,7 +2395,7 @@ bool isQueryKilled(SQInfo *pQInfo) { // query has been executed more than tsShellActivityTimer, and the retrieve has not arrived // abort current query execution. - if (pQInfo->owner != 0 && ((taosGetTimestampSec() - pQInfo->startExecTs) > getMaximumIdleDurationSec()) && + if (pQInfo->owner != 0 && ((taosGetTimestampSec() - pQInfo->startExecTs/1000) > getMaximumIdleDurationSec()) && (!needBuildResAfterQueryComplete(pQInfo))) { assert(pQInfo->startExecTs != 0);