forked from LBRYCommunity/lbry-sdk
fixes from jack comments
This commit is contained in:
parent
c31e61586d
commit
63d1ec3c28
1 changed files with 2 additions and 2 deletions
|
@ -89,12 +89,12 @@ class StreamAssembler:
|
||||||
with open(self.output_path, 'wb') as stream_handle:
|
with open(self.output_path, 'wb') as stream_handle:
|
||||||
self.stream_handle = stream_handle
|
self.stream_handle = stream_handle
|
||||||
for blob_info in self.descriptor.blobs[:-1]:
|
for blob_info in self.descriptor.blobs[:-1]:
|
||||||
while True:
|
while not stream_handle.closed:
|
||||||
try:
|
try:
|
||||||
blob = await self.get_blob(blob_info.blob_hash, blob_info.length)
|
blob = await self.get_blob(blob_info.blob_hash, blob_info.length)
|
||||||
if await self._decrypt_blob(blob, blob_info, self.descriptor.key):
|
if await self._decrypt_blob(blob, blob_info, self.descriptor.key):
|
||||||
await self.blob_manager.blob_completed(blob)
|
await self.blob_manager.blob_completed(blob)
|
||||||
break
|
break
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
log.debug("stream assembler stopped")
|
log.debug("stream assembler stopped")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue