little bit better threading [pchote: picked/amended]

This commit is contained in:
alzeih
2010-07-24 19:13:34 +12:00
committed by Paul Chote
parent 443f2bb6b9
commit 2254e48f65

View File

@@ -115,6 +115,8 @@ namespace OpenRA.Network
{
connectionState = ConnectionState.NotConnected;
}
catch ( IOException ) { socket.Close(); }
catch (ThreadAbortException ) { socket.Close(); }
}
) { IsBackground = true };
t.Start();
@@ -145,8 +147,8 @@ namespace OpenRA.Network
disposed = true;
GC.SuppressFinalize( this );
socket.Close();
t.Abort();
t.Join();
}
~NetworkConnection() { Dispose(); }