Author: alanmc
Date: 2006-09-17 10:11:24 -0400 (Sun, 17 Sep 2006)
New Revision: 65546
Modified:
trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
Log:
Should correctly update download/upload now for all peers
Modified: trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
2006-09-17 14:08:26 UTC (rev 65545)
+++ trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
2006-09-17 14:11:24 UTC (rev 65546)
@@ -495,6 +495,8 @@
lock (this.listLock)
{
+ counter++;
+
// If we havn't reached our max connected peers, connect to
another one.
if ((this.available.Count > 0) && (this.connectedPeers.Count <
this.settings.MaxConnections))
ClientEngine.connectionManager.ConnectToPeer(this);
@@ -507,7 +509,7 @@
if (id.Peer.Connection == null)
continue;
- if (counter++ % 20 == 0) // Call it every
second... ish
+ if (counter % 20 == 0) // Call it every second...
ish
id.Peer.Connection.Monitor.TimePeriodPassed();
bool isInteresting =
this.pieceManager.IsInteresting(id);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches