Skip to content

Commit

Permalink
Merge pull request #507 from lbryio/fix_download_timeout
Browse files Browse the repository at this point in the history
Fix downloading not timing out properly when unable to download sd blob
  • Loading branch information
lyoshenka authored Mar 3, 2017
2 parents 9350b9e + d642ba0 commit daa0ff0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ at anytime.

### Fixed
* Fixed ExchangeRateManager freezing the app
* Fixed download not timing out properly when downloading sd blob
*
*

Expand Down
4 changes: 2 additions & 2 deletions lbrynet/lbrynet_daemon/Downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ def download(self, stream_info, name):
log.info("Downloading lbry://%s (%s) --> %s", name, self.sd_hash[:6], self.download_path)
self.finished_deferred = self.downloader.start()
self.finished_deferred.addCallback(self.finish, name)
yield self.data_downloading_deferred

@defer.inlineCallbacks
def start(self, stream_info, name):
try:
safe_start(self.checker)
yield self.download(stream_info, name)
self.download(stream_info, name)
yield self.data_downloading_deferred
defer.returnValue(self.download_path)
except Exception as err:
safe_stop(self.checker)
Expand Down

0 comments on commit daa0ff0

Please sign in to comment.