Skip to content

Commit 5dd0db6

Browse files
If we've only seen eofs, we should report the error instead of the EOFs (#969)
1 parent 29106d5 commit 5dd0db6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/workers.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,14 +836,14 @@ void KafkaConsumerConsumeNum::Execute() {
836836
default:
837837
// Set the error for any other errors and break
838838
delete message;
839-
if (m_messages.size() == 0) {
839+
if (m_messages.size() == eof_event_count) {
840840
SetErrorBaton(Baton(errorCode));
841841
}
842842
looping = false;
843843
break;
844844
}
845845
} else {
846-
if (m_messages.size() == 0) {
846+
if (m_messages.size() == eof_event_count) {
847847
SetErrorBaton(b);
848848
}
849849
looping = false;

0 commit comments

Comments
 (0)