From 39d7e54e7f6f0cb5233d05d2e0a2a0f58a5c3a73 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 9 Sep 2010 18:58:26 +1200 Subject: [PATCH] fix one crash when server drops --- OpenRA.Game/Network/Connection.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Game/Network/Connection.cs b/OpenRA.Game/Network/Connection.cs index 808d4ef3e8..ea39217c2d 100755 --- a/OpenRA.Game/Network/Connection.cs +++ b/OpenRA.Game/Network/Connection.cs @@ -140,8 +140,11 @@ namespace OpenRA.Network } catch (SocketException) { /* drop this on the floor; we'll pick up the disconnect from the reader thread */ } + catch (ObjectDisposedException) { /* ditto */ } } + bool disposed = false; + public void Dispose () { if (disposed) return;