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

Added fix for discovery requests arriving when handshake in progress

Added sanity checks for handshake connections (in DEBUG)
This commit is contained in:
lidgren
2011-06-12 14:30:20 +00:00
parent e10be613d6
commit 5234fb64c6
2 changed files with 57 additions and 22 deletions

View File

@@ -361,6 +361,7 @@ namespace Lidgren.Network
return;
}
break;
case NetMessageType.Disconnect:
// ouch
string reason = "Ouch";
@@ -374,6 +375,15 @@ namespace Lidgren.Network
}
ExecuteDisconnect(reason, false);
break;
case NetMessageType.Discovery:
m_peer.HandleIncomingDiscoveryRequest(now, m_remoteEndpoint, ptr, payloadLength);
return;
case NetMessageType.DiscoveryResponse:
m_peer.HandleIncomingDiscoveryResponse(now, m_remoteEndpoint, ptr, payloadLength);
return;
default:
m_peer.LogDebug("Unhandled type during handshake: " + tp + " length: " + payloadLength);
break;