Author: alanmc
Date: 2006-09-17 10:07:09 -0400 (Sun, 17 Sep 2006)
New Revision: 65544

Modified:
   trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
Log:
"bool amHashing" has been removed as TorrentState will be "Hashing" when we are 
hashing

Modified: trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs    
2006-09-17 14:06:28 UTC (rev 65543)
+++ trunk/bitsharp/src/MonoTorrent.Client/Managers/TorrentManager.cs    
2006-09-17 14:07:09 UTC (rev 65544)
@@ -69,17 +69,7 @@
         internal Queue<PeerConnectionID> downloadQueue;
         internal Queue<PeerConnectionID> uploadQueue;
 
-#warning TorrentState should now be enough to check if we are hashing
-        /// <summary>
-        /// True if we are currently hashchecking
-        /// </summary>
-        public bool AmHashing
-        {
-            get { return this.amHashing; }
-        }
-        private bool amHashing;
 
-
         /// <summary>
         /// The Torrent contained within this TorrentManager
         /// </summary>
@@ -360,16 +350,15 @@
         internal void Start()
         {
             TorrentStateChangedEventArgs args;
-            if (!this.hashChecked && !this.amHashing)
+            if (!this.hashChecked && !(this.state == TorrentState.Hashing))
             {
-                this.amHashing = true;
-                ThreadPool.QueueUserWorkItem(new WaitCallback(HashCheck), 
this);
-
                 args = new TorrentStateChangedEventArgs(this.state, 
TorrentState.Hashing);
                 this.state = TorrentState.Hashing;
+
                 if (this.OnTorrentStateChanged != null)
                     OnTorrentStateChanged(this, args);
 
+                ThreadPool.QueueUserWorkItem(new WaitCallback(HashCheck), 
this);
                 return;
             }
 

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

Reply via email to