You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-19 00:26:30 +09:00
Fixed AcceptIncomingConnections = false actualling having an effect
This commit is contained in:
@@ -614,17 +614,12 @@ namespace Lidgren.Network
|
|||||||
LogWarning("Received unhandled library message " + tp + " from " + senderEndPoint);
|
LogWarning("Received unhandled library message " + tp + " from " + senderEndPoint);
|
||||||
return;
|
return;
|
||||||
case NetMessageType.Connect:
|
case NetMessageType.Connect:
|
||||||
// proceed
|
if (m_configuration.AcceptIncomingConnections == false)
|
||||||
break;
|
{
|
||||||
case NetMessageType.Disconnect:
|
LogWarning("Received Connect, but we're not accepting incoming connections!");
|
||||||
// this is probably ok
|
|
||||||
LogVerbose("Received Disconnect from unconnected source: " + senderEndPoint);
|
|
||||||
return;
|
|
||||||
default:
|
|
||||||
LogWarning("Received unhandled library message " + tp + " from " + senderEndPoint);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// handle connect
|
||||||
// It's someone wanting to shake hands with us!
|
// It's someone wanting to shake hands with us!
|
||||||
|
|
||||||
int reservedSlots = m_handshakes.Count + m_connections.Count;
|
int reservedSlots = m_handshakes.Count + m_connections.Count;
|
||||||
@@ -642,8 +637,16 @@ namespace Lidgren.Network
|
|||||||
conn.m_status = NetConnectionStatus.ReceivedInitiation;
|
conn.m_status = NetConnectionStatus.ReceivedInitiation;
|
||||||
m_handshakes.Add(senderEndPoint, conn);
|
m_handshakes.Add(senderEndPoint, conn);
|
||||||
conn.ReceivedHandshake(now, tp, ptr, payloadByteLength);
|
conn.ReceivedHandshake(now, tp, ptr, payloadByteLength);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case NetMessageType.Disconnect:
|
||||||
|
// this is probably ok
|
||||||
|
LogVerbose("Received Disconnect from unconnected source: " + senderEndPoint);
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
LogWarning("Received unhandled library message " + tp + " from " + senderEndPoint);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void AcceptConnection(NetConnection conn)
|
internal void AcceptConnection(NetConnection conn)
|
||||||
|
|||||||
Reference in New Issue
Block a user