try fix mantis 8283

0.9.0.1-postfixes
UbitUmarov 2018-01-22 21:43:21 +00:00
parent 8fe16a1974
commit af9bff7ed2
1 changed files with 12 additions and 3 deletions

View File

@ -228,14 +228,23 @@ namespace OpenMetaverse
{ {
m_log.Debug("[UDPBASE]: Failed to increase default TTL"); m_log.Debug("[UDPBASE]: Failed to increase default TTL");
} }
try try
{ {
// This udp socket flag is not supported under mono, // This udp socket flag is not supported under mono,
// so we'll catch the exception and continue // so we'll catch the exception and continue
// Try does not protect some mono versions on mac
if(Util.IsWindows())
{
m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null); m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null);
m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set"); m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set");
} }
catch (SocketException) else
{
m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag not supported on this platform, ignoring");
}
}
catch
{ {
m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag not supported on this platform, ignoring"); m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag not supported on this platform, ignoring");
} }