From 41b76144daef0e5f23c10c9804d42fc706185182 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 26 Jul 2010 17:49:08 +1200 Subject: [PATCH] force the socket closed so the client thread will die pretty fast. dirty hack, but teh read timeout is nuts otherwise. --- OpenRA.Game/Network/Connection.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Network/Connection.cs b/OpenRA.Game/Network/Connection.cs index 7670918a51..b2bce7a393 100755 --- a/OpenRA.Game/Network/Connection.cs +++ b/OpenRA.Game/Network/Connection.cs @@ -14,6 +14,7 @@ using System.IO; using System.Net.Sockets; using System.Threading; using OpenRA.Server; +using OpenRA.Support; namespace OpenRA.Network { @@ -148,7 +149,9 @@ namespace OpenRA.Network GC.SuppressFinalize( this ); t.Abort(); - t.Join(); + socket.Client.Close(); + using( new PerfSample( "Thread.Join" )) + t.Join(); } ~NetworkConnection() { Dispose(); }