From 989ae86a05f29b092dbac0d0ad3738e2ce5e3ea4 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 16 Mar 2023 14:32:40 +0800 Subject: [PATCH] fix(tmq): adjust the time out value check. --- source/client/src/clientTmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 50d1e78c89..4558056b3c 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) { -- GitLab