You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-06 02:11:06 +09:00
Fixed problem with setting correct local address when we change DualStack property. Do not use any IPv6 features by default.
This commit is contained in:
@@ -135,7 +135,11 @@ namespace Lidgren.Network
|
||||
if(m_configuration.DualStack && m_configuration.LocalAddress.AddressFamily == AddressFamily.InterNetworkV6)
|
||||
m_socket.DualMode = true;
|
||||
|
||||
var ep = (EndPoint)new NetEndPoint(m_configuration.LocalAddress.MapToIPv6(), reBind ? m_listenPort : m_configuration.Port);
|
||||
var localAddress = m_configuration.DualStack
|
||||
? m_configuration.LocalAddress.MapToIPv6()
|
||||
: m_configuration.LocalAddress;
|
||||
|
||||
var ep = (EndPoint)new NetEndPoint(localAddress, reBind ? m_listenPort : m_configuration.Port);
|
||||
m_socket.Bind(ep);
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user