Skip to content
Merged
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
7 changes: 6 additions & 1 deletion agents/statsd/src/statsd_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,14 @@ void StatsDAgent::send_stats_msg_cb_(nsuv::ns_async*,
}

string_vector sv;
while (agent->send_stats_msg_q_.dequeue(sv)) {
// Let configuration and shutdown callbacks run even while workers keep
// sending.
for (size_t i = 0; i < 1024 && agent->send_stats_msg_q_.dequeue(sv); i++) {
agent->connection_->write(sv);
}
if (!agent->send_stats_msg_q_.empty()) {
ASSERT_EQ(0, agent->send_stats_msg_.send());
}
}

int StatsDAgent::send(const std::vector<std::string>& sv, size_t len) {
Expand Down
Loading