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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/salticidae/network.h b/include/salticidae/network.h
index b36cbe3..7814d56 100644
--- a/include/salticidae/network.h
+++ b/include/salticidae/network.h
@@ -447,8 +447,8 @@ void MsgNetwork<OpcodeType>::Conn::on_read() {
return;
}
#endif
- mn->incoming_msgs.enqueue(
- std::make_pair(std::move(msg), static_pointer_cast<Conn>(self())));
+ auto conn = static_pointer_cast<Conn>(self());
+ while (!mn->incoming_msgs.try_enqueue(std::make_pair(msg, conn)));
}
}
}