Skip to content

Commit

Permalink
Don't block forever in poll when flushing.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidblewett committed Dec 12, 2024
1 parent ac574f2 commit 2672739
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/producer/base_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ where
};
if ret.is_error() {
return Err(KafkaError::Flush(ret.into()));
} else if let Deadline::Never = &deadline {
self.poll(Timeout::After(Duration::ZERO));
} else {
self.poll(&deadline);
}
Expand Down

0 comments on commit 2672739

Please sign in to comment.