Skip to content

Commit

Permalink
fix error when using UnsyncedEvents and AllowPeerAddressChange
Browse files Browse the repository at this point in the history
  • Loading branch information
RevenantX committed Oct 9, 2023
1 parent d142950 commit 373dfc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LiteNetLib/NetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ private void DebugMessageReceived(NetPacket packet, IPEndPoint remoteEndPoint)
{
_peersLock.EnterUpgradeableReadLock();
var peer = _peersArray[remoteData.PeerId];
_peersLock.ExitUpgradeableReadLock();
if (peer != null &&
peer.ConnectTime == remoteData.ConnectionTime &&
peer.ConnectionNum == remoteData.ConnectionNumber)
Expand All @@ -1054,7 +1055,6 @@ private void DebugMessageReceived(NetPacket packet, IPEndPoint remoteEndPoint)
}
isOldPeer = true;
}
_peersLock.ExitUpgradeableReadLock();
}
}

Expand Down

0 comments on commit 373dfc7

Please sign in to comment.