Author: alanmc
Date: 2006-11-02 09:46:40 -0500 (Thu, 02 Nov 2006)
New Revision: 67272

Modified:
   trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
Log:
Further fix. Was incorrectly always setting TorrentState = TorrentState.Seeding 
after 4 seconds.

Modified: trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs    
2006-11-02 14:43:53 UTC (rev 67271)
+++ trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs    
2006-11-02 14:46:40 UTC (rev 67272)
@@ -474,7 +474,8 @@
 
                 if (counter % 100 == 0)
                 {
-                    UpdateState(TorrentState.Seeding);
+                    if(this.Progress() == 100.0)
+                        UpdateState(TorrentState.Seeding);
                     // If the last connection succeeded, then update at the 
regular interval
                     if (this.trackerManager.UpdateSucceeded)
                     {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to