From 350a603e84e51f53462d5798afd0789f4fb92338 Mon Sep 17 00:00:00 2001 From: lidgren Date: Wed, 27 Oct 2010 19:53:10 +0000 Subject: [PATCH] Removed attempt to disconnect offending connection on ConnectionReset --- Lidgren.Network/NetPeer.Internal.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Lidgren.Network/NetPeer.Internal.cs b/Lidgren.Network/NetPeer.Internal.cs index 605a4b4..b193b7a 100644 --- a/Lidgren.Network/NetPeer.Internal.cs +++ b/Lidgren.Network/NetPeer.Internal.cs @@ -259,22 +259,11 @@ namespace Lidgren.Network } catch (SocketException sx) { - // no good response to this yet if (sx.SocketErrorCode == SocketError.ConnectionReset) { // connection reset by peer, aka connection forcibly closed aka "ICMP port unreachable" // we should shut down the connection; but m_senderRemote seemingly cannot be trusted, so which connection should we shut down?! - //LogWarning("Connection reset by peer, seemingly from " + m_senderRemote); - lock (m_connections) - { - if (m_connections.Count + m_handshakes.Count == 1) - { - foreach (var kvp in m_handshakes) - kvp.Value.ExecuteDisconnect("Connection forcibly closed", true); - foreach (var conn in m_connections) - conn.ExecuteDisconnect("Connection forcibly closed", true); - } - } + // So, what to do? return; }