aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/salticidae/network.h')
-rw-r--r--include/salticidae/network.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/salticidae/network.h b/include/salticidae/network.h
index 2cef81d..1b871f5 100644
--- a/include/salticidae/network.h
+++ b/include/salticidae/network.h
@@ -451,7 +451,8 @@ void MsgNetwork<OpcodeType>::Conn::on_read() {
}
#endif
auto conn = static_pointer_cast<Conn>(self());
- while (!mn->incoming_msgs.try_enqueue(std::make_pair(msg, conn)));
+ while (!mn->incoming_msgs.enqueue(std::make_pair(msg, conn), false))
+ std::this_thread::yield();
}
}
}