mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-10-03 00:30:34 +00:00
stop failed downloader outside of GetStream
This commit is contained in:
parent
334611ab74
commit
29e451a326
1 changed files with 3 additions and 4 deletions
|
@ -76,7 +76,7 @@ class GetStream(object):
|
||||||
Check if we've got the first data blob in the stream yet
|
Check if we've got the first data blob in the stream yet
|
||||||
"""
|
"""
|
||||||
self.timeout_counter += 1
|
self.timeout_counter += 1
|
||||||
if self.timeout_counter >= self.timeout:
|
if self.timeout_counter > self.timeout:
|
||||||
if not self.data_downloading_deferred.called:
|
if not self.data_downloading_deferred.called:
|
||||||
self.data_downloading_deferred.errback(DownloadDataTimeout(self.sd_hash))
|
self.data_downloading_deferred.errback(DownloadDataTimeout(self.sd_hash))
|
||||||
|
|
||||||
|
@ -213,9 +213,8 @@ class GetStream(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
yield self.data_downloading_deferred
|
yield self.data_downloading_deferred
|
||||||
except Exception as err:
|
except DownloadDataTimeout as err:
|
||||||
self.downloader.stop()
|
|
||||||
safe_stop_looping_call(self.checker)
|
safe_stop_looping_call(self.checker)
|
||||||
raise
|
raise err
|
||||||
|
|
||||||
defer.returnValue((self.downloader, self.finished_deferred))
|
defer.returnValue((self.downloader, self.finished_deferred))
|
||||||
|
|
Loading…
Add table
Reference in a new issue