aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-10-30 20:54:23 +0000
committerJustin Clark-Casey (justincc)2014-11-25 23:23:09 +0000
commit5d5ea9234ffc71876bc55789ab764c294a913b95 (patch)
treedf10aefe43189439c1e937c0c40438b2c219da06 /OpenSim
parentOn pCampbot, if we add the none (n) behaviour then make it actually stop any ... (diff)
downloadopensim-SC_OLD-5d5ea9234ffc71876bc55789ab764c294a913b95.zip
opensim-SC_OLD-5d5ea9234ffc71876bc55789ab764c294a913b95.tar.gz
opensim-SC_OLD-5d5ea9234ffc71876bc55789ab764c294a913b95.tar.bz2
opensim-SC_OLD-5d5ea9234ffc71876bc55789ab764c294a913b95.tar.xz
Stop Mono 3.2.8 from binding a UDP socket to a port already in use.
At least on Mono 3.2.8 (but not under Windows), one can bind multiple UDP sockets to the same port by default. Different simulators cannot demultiplex each other's messages, so a set of confusing non-obvious errors arise if this occurs. This change prevents such multiple binding.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index 5323d5a..94300f8 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -168,6 +168,12 @@ namespace OpenMetaverse
168 m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag not supported on this platform, ignoring"); 168 m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag not supported on this platform, ignoring");
169 } 169 }
170 170
171 // On at least Mono 3.2.8, multiple UDP sockets can bind to the same port by default. At the moment
172 // we never want two regions to listen on the same port as they cannot demultiplex each other's messages,
173 // leading to a confusing bug.
174 // By default, Windows does not allow two sockets to bind to the same port.
175 m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
176
171 if (recvBufferSize != 0) 177 if (recvBufferSize != 0)
172 m_udpSocket.ReceiveBufferSize = recvBufferSize; 178 m_udpSocket.ReceiveBufferSize = recvBufferSize;
173 179