You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 23:26:32 +09:00
Fixed maximum handshake attempts one-off error
Fixed better disconnect messages when not yet fully connected (aborting connection attempt)
This commit is contained in:
@@ -102,6 +102,17 @@ namespace Lidgren.Network
|
||||
NetConnection serverConnection = ServerConnection;
|
||||
if (serverConnection == null)
|
||||
{
|
||||
lock (m_handshakes)
|
||||
{
|
||||
if (m_handshakes.Count > 0)
|
||||
{
|
||||
LogVerbose("Aborting connection attempt");
|
||||
foreach(var hs in m_handshakes)
|
||||
hs.Value.Disconnect(byeMessage);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
LogWarning("Disconnect requested when not connected!");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user