Skip to content

Commit 204dbe2

Browse files
committed
Fix logic error so that we always poll at least once even when
timeout is `Duration::ZERO`.
1 parent 3f2b5b9 commit 204dbe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/producer/base_producer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ where
366366
Duration::MAX
367367
};
368368
let mut attempt = 0;
369-
while attempt > 0 && remaining > Duration::ZERO {
369+
while attempt >= 0 && remaining > Duration::ZERO {
370370
let start = Instant::now();
371371
let event = self
372372
.client()

0 commit comments

Comments
 (0)