You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-06 10:21:09 +09:00
Fixed host port switch detection
This commit is contained in:
@@ -496,11 +496,14 @@ namespace Lidgren.Network
|
|||||||
// Lets just assume the router decided to use this port instead
|
// Lets just assume the router decided to use this port instead
|
||||||
//
|
//
|
||||||
var hsconn = hs.Value;
|
var hsconn = hs.Value;
|
||||||
m_connectionLookup.Remove(hsconn.RemoteEndpoint);
|
m_connectionLookup.Remove(hs.Key);
|
||||||
|
m_handshakes.Remove(hs.Key);
|
||||||
|
|
||||||
LogDebug("Detected host port change; rerouting connection to " + senderEndpoint);
|
LogDebug("Detected host port change; rerouting connection to " + senderEndpoint);
|
||||||
hsconn.MutateEndpoint(senderEndpoint);
|
hsconn.MutateEndpoint(senderEndpoint);
|
||||||
|
|
||||||
m_connectionLookup.Add(senderEndpoint, hsconn);
|
m_connectionLookup.Add(senderEndpoint, hsconn);
|
||||||
|
m_handshakes.Add(senderEndpoint, hsconn);
|
||||||
|
|
||||||
hsconn.ReceivedHandshake(now, tp, ptr, payloadByteLength);
|
hsconn.ReceivedHandshake(now, tp, ptr, payloadByteLength);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user