1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-18 16:16:35 +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) if (m_socket != null)
{ {
m_socket.Shutdown(SocketShutdown.Receive); try
{
m_socket.Shutdown(SocketShutdown.Receive);
}
catch { }
m_socket.Close(2); // 2 seconds timeout m_socket.Close(2); // 2 seconds timeout
} }
if (m_messageReceivedEvent != null) if (m_messageReceivedEvent != null)