diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 50d1e78c895a88b16878f7c56f6237f28c16de27..4558056b3c06441baeaed45c927e2458aedf7651 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1943,7 +1943,7 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { return NULL; } - if (timeout != -1) { + if (timeout > 0) { int64_t currentTime = taosGetTimestampMs(); int64_t elapsedTime = currentTime - startTime; if (elapsedTime > timeout) {