Don't send empty message lists from dispatch.

This terminates the write thread.
This commit is contained in:
Peter Johnson
2015-07-31 22:49:43 -07:00
parent 4356e313ec
commit a9af4589ac

View File

@@ -159,8 +159,10 @@ void Dispatcher::DispatchThreadMain() {
// scan outgoing messages to remove unnecessary updates
// send outgoing messages
for (auto& conn : connections)
conn.net->outgoing().emplace(std::move(conn.outgoing));
for (auto& conn : connections) {
if (!conn.outgoing.empty())
conn.net->outgoing().emplace(std::move(conn.outgoing));
}
}
}