]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
download.py: set up self._paused before registering the producer, since they might...
authorBrian Warner <warner@lothar.com>
Mon, 28 Jul 2008 21:57:31 +0000 (14:57 -0700)
committerBrian Warner <warner@lothar.com>
Mon, 28 Jul 2008 21:57:31 +0000 (14:57 -0700)
src/allmydata/immutable/download.py

index cdc210c54ae1ade599c4a62a9d1e14495aa1d0db..878d38d09fe470bd282a08c2a900dc91d0a1d5fb 100644 (file)
@@ -456,13 +456,13 @@ class FileDownloader:
         self._results.timings["cumulative_decrypt"] = 0.0
         self._results.timings["paused"] = 0.0
 
+        self._paused = False
+        self._stopped = False
         if IConsumer.providedBy(downloadable):
             downloadable.registerProducer(self, True)
         self._downloadable = downloadable
         self._output = Output(downloadable, u.key, self._size, self._log_number,
                               self._status)
-        self._paused = False
-        self._stopped = False
 
         self.active_buckets = {} # k: shnum, v: bucket
         self._share_buckets = [] # list of (sharenum, bucket) tuples