fix(tmq): adjust the time out value check.

This commit is contained in:
Haojun Liao 2023-03-16 14:32:40 +08:00
parent a1682664f2
commit 989ae86a05
1 changed files with 1 additions and 1 deletions

View File

@ -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) {