From: Brian Warner Date: Mon, 28 Jul 2008 21:57:31 +0000 (-0700) Subject: download.py: set up self._paused before registering the producer, since they might... X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/%3C?a=commitdiff_plain;h=cd4d3cdeeacca0aa9f82ff2c7d952f3377a7bd36;p=tahoe-lafs%2Ftahoe-lafs.git download.py: set up self._paused before registering the producer, since they might call pauseProducing right away --- diff --git a/src/allmydata/immutable/download.py b/src/allmydata/immutable/download.py index cdc210c5..878d38d0 100644 --- a/src/allmydata/immutable/download.py +++ b/src/allmydata/immutable/download.py @@ -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