Author: alanmc
Date: 2008-02-02 11:23:42 -0500 (Sat, 02 Feb 2008)
New Revision: 94633
Modified:
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Managers/ConnectionManager.cs
Log:
Fixed a possible threading issue with the new connection code.
Modified:
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Managers/ConnectionManager.cs
===================================================================
---
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Managers/ConnectionManager.cs
2008-02-02 15:34:30 UTC (rev 94632)
+++
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Managers/ConnectionManager.cs
2008-02-02 16:23:42 UTC (rev 94633)
@@ -259,6 +259,11 @@
}
}
}
+ finally
+ {
+ // Try to connect to another peer
+ TryConnect();
+ }
}
internal void ProcessFreshConnection(PeerIdInternal id)
@@ -347,9 +352,6 @@
System.Threading.Interlocked.Decrement(ref
this.halfOpenConnections);
if (cleanUp)
CleanupSocket(id, reason);
-
- // Try to connect to another peer
- TryConnect();
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches