Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/workers.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,19 @@ class MessageWorker : public ErrorAwareWorker {
}

for (unsigned int i = 0; i < message_queue.size(); i++) {
HandleMessageCallback(message_queue[i], RdKafka::ERR_NO_ERROR);
if (callback && !callback->IsEmpty()) {
HandleMessageCallback(message_queue[i], RdKafka::ERR_NO_ERROR);
}

// we are done with it. it is about to go out of scope
// for the last time so let's just free it up here. can't rely
// on the destructor
}

for (unsigned int i = 0; i < warning_queue.size(); i++) {
HandleMessageCallback(NULL, warning_queue[i]);
if (callback && !callback->IsEmpty()) {
HandleMessageCallback(NULL, warning_queue[i]);
}
}
}

Expand Down