mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-06-17 14:12:25 +00:00
Possible deadlock fix
This commit is contained in:
+1
-1
@@ -342,7 +342,7 @@ std::shared_ptr<TClient> TNetwork::CreateClient(SOCKET TCPSock) {
|
|||||||
bool TNetwork::TCPSend(TClient& c, const std::string& Data, bool IsSync) {
|
bool TNetwork::TCPSend(TClient& c, const std::string& Data, bool IsSync) {
|
||||||
if (!IsSync) {
|
if (!IsSync) {
|
||||||
if (c.IsSyncing()) {
|
if (c.IsSyncing()) {
|
||||||
std::unique_lock Lock(c.MissedPacketQueueMutex());
|
//std::unique_lock Lock(c.MissedPacketQueueMutex());
|
||||||
c.EnqueueMissedPacketDuringSyncing(Data);
|
c.EnqueueMissedPacketDuringSyncing(Data);
|
||||||
return true;
|
return true;
|
||||||
} else if (!c.IsSyncing() && c.IsSynced() && c.MissedPacketQueueSize() != 0) {
|
} else if (!c.IsSyncing() && c.IsSynced() && c.MissedPacketQueueSize() != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user