1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-06 02:11:06 +09:00

Fixed issue with disconnected by server

This commit is contained in:
lidgren
2011-03-11 08:58:58 +00:00
parent 97a2b76856
commit d111b20491

View File

@@ -108,7 +108,8 @@ namespace Lidgren.Network
SetStatus(NetConnectionStatus.Disconnected, reason); SetStatus(NetConnectionStatus.Disconnected, reason);
// in case we're still in handshake // in case we're still in handshake
m_peer.m_handshakes.Remove(m_remoteEndpoint); lock (m_peer.m_handshakes)
m_peer.m_handshakes.Remove(m_remoteEndpoint);
m_disconnectRequested = false; m_disconnectRequested = false;
m_connectRequested = false; m_connectRequested = false;
@@ -371,7 +372,7 @@ namespace Lidgren.Network
catch catch
{ {
} }
SetStatus(NetConnectionStatus.Disconnected, reason); ExecuteDisconnect(reason, false);
break; break;
default: default:
m_peer.LogDebug("Unhandled type during handshake: " + tp + " length: " + payloadLength); m_peer.LogDebug("Unhandled type during handshake: " + tp + " length: " + payloadLength);