Author: alanmc
Date: 2007-03-28 10:24:10 -0500 (Wed, 28 Mar 2007)
New Revision: 75080
Modified:
trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
Log:
Updated the order in which things happen to remove a race condition where
double announces could happen.
Modified: trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
2007-03-28 15:23:42 UTC (rev 75079)
+++ trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
2007-03-28 15:24:10 UTC (rev 75080)
@@ -289,14 +289,15 @@
this.loadedFastResume = false;
}
+ this.TrackerManager.Scrape();
+ this.trackerManager.Announce(TorrentEvent.Started); //
Tell server we're starting
+ ClientEngine.ConnectionManager.RegisterManager(this);
+
if (this.Progress == 100.0)
UpdateState(TorrentState.Seeding);
else
UpdateState(TorrentState.Downloading);
- this.TrackerManager.Scrape();
- this.trackerManager.Announce(TorrentEvent.Started); // Tell server
we're starting
- ClientEngine.ConnectionManager.RegisterManager(this);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches