From af9bff7ed29467a940087d1b8f29a5afee76b351 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 22 Jan 2018 21:43:21 +0000 Subject: try fix mantis 8283 --- OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 8dd96d6..f362b06 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs @@ -228,14 +228,23 @@ namespace OpenMetaverse { m_log.Debug("[UDPBASE]: Failed to increase default TTL"); } + try { // This udp socket flag is not supported under mono, // so we'll catch the exception and continue - m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null); - m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set"); + // Try does not protect some mono versions on mac + if(Util.IsWindows()) + { + m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null); + m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set"); + } + else + { + m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag not supported on this platform, ignoring"); + } } - catch (SocketException) + catch { m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag not supported on this platform, ignoring"); } -- cgit v1.1