mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Don't send empty message lists from dispatch.
This terminates the write thread.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user