mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 14:26:09 +00:00
fix race condition in packet queueing
This commit is contained in:
@@ -338,6 +338,7 @@ std::shared_ptr<TClient> TNetwork::CreateClient(SOCKET TCPSock) {
|
||||
|
||||
bool TNetwork::TCPSend(TClient& c, const std::string& Data, bool IsSync) {
|
||||
if (!IsSync) {
|
||||
std::unique_lock Lock(c.MissedPacketQueueMutex());
|
||||
if (c.IsSyncing()) {
|
||||
c.EnqueueMissedPacketDuringSyncing(Data);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user