forked from LBRYCommunity/lbry-sdk
fix recursion depth bug upon failed blob
This commit is contained in:
parent
d053db8dfd
commit
f2ddc9bd98
1 changed files with 3 additions and 2 deletions
|
@ -250,7 +250,7 @@ class EncryptedFileReflectorClient(Protocol):
|
||||||
def skip_missing_blob(self, err, blob_hash):
|
def skip_missing_blob(self, err, blob_hash):
|
||||||
log.warning("Can't reflect blob %s", str(blob_hash)[:16])
|
log.warning("Can't reflect blob %s", str(blob_hash)[:16])
|
||||||
err.trap(ValueError)
|
err.trap(ValueError)
|
||||||
return self.send_next_request()
|
self.blob_hashes_to_send.append(blob_hash)
|
||||||
|
|
||||||
def send_next_request(self):
|
def send_next_request(self):
|
||||||
if self.file_sender is not None:
|
if self.file_sender is not None:
|
||||||
|
@ -260,7 +260,8 @@ class EncryptedFileReflectorClient(Protocol):
|
||||||
# open the sd blob to send
|
# open the sd blob to send
|
||||||
blob = self.stream_descriptor
|
blob = self.stream_descriptor
|
||||||
d = self.open_blob_for_reading(blob)
|
d = self.open_blob_for_reading(blob)
|
||||||
d.addCallback(lambda _: self.send_descriptor_info())
|
d.addCallbacks(lambda _: self.send_descriptor_info(),
|
||||||
|
lambda err: self.skip_missing_blob(err, blob.blob_hash))
|
||||||
return d
|
return d
|
||||||
elif self.blob_hashes_to_send:
|
elif self.blob_hashes_to_send:
|
||||||
# open the next blob to send
|
# open the next blob to send
|
||||||
|
|
Loading…
Reference in a new issue