1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 23:26:32 +09:00

- Handle NatIntroduction message even if connection already exists

This commit is contained in:
lidgren
2012-10-29 16:01:48 +00:00
parent 0875aff427
commit ce2644cead
2 changed files with 5 additions and 1 deletions

View File

@@ -409,6 +409,10 @@ namespace Lidgren.Network
int size = emsg.ReadInt32();
HandleExpandMTUSuccess(now, size);
break;
case NetMessageType.NatIntroduction:
// Unusual situation where server is actually already known, but got a nat introduction - oh well, lets handle it as usual
m_peer.HandleNatIntroduction(ptr);
break;
default:
m_peer.LogWarning("Connection received unhandled library message: " + tp);
break;

View File

@@ -38,7 +38,7 @@ namespace Lidgren.Network
/// <summary>
/// Called when host/client receives a NatIntroduction message from a master server
/// </summary>
private void HandleNatIntroduction(int ptr)
internal void HandleNatIntroduction(int ptr)
{
VerifyNetworkThread();