1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 15:16:33 +09:00

Extra try-catch added for socket.Shutdown() failing on mono

This commit is contained in:
lidgren
2011-12-19 10:20:11 +00:00
parent 3336e95586
commit af3608c544

View File

@@ -221,7 +221,11 @@ namespace Lidgren.Network
{
if (m_socket != null)
{
m_socket.Shutdown(SocketShutdown.Receive);
try
{
m_socket.Shutdown(SocketShutdown.Receive);
}
catch { }
m_socket.Close(2); // 2 seconds timeout
}
if (m_messageReceivedEvent != null)