From 601666d9fbb79e640f021eb36ac906948171d8bb Mon Sep 17 00:00:00 2001 From: lidgren Date: Sat, 11 Oct 2014 08:25:21 +0000 Subject: [PATCH] Fix to rebind same port as previously bound --- Lidgren.Network/NetPeer.Internal.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lidgren.Network/NetPeer.Internal.cs b/Lidgren.Network/NetPeer.Internal.cs index 1b4f0ee..1ac3815 100644 --- a/Lidgren.Network/NetPeer.Internal.cs +++ b/Lidgren.Network/NetPeer.Internal.cs @@ -132,7 +132,7 @@ namespace Lidgren.Network m_socket.SendBufferSize = m_configuration.SendBufferSize; m_socket.Blocking = false; - var ep = (EndPoint)new IPEndPoint(m_configuration.LocalAddress, m_configuration.Port); + var ep = (EndPoint)new IPEndPoint(m_configuration.LocalAddress, reBind ? m_listenPort : m_configuration.Port); m_socket.Bind(ep); try