handle ConnectionError and ValueError in blob sendfile
This commit is contained in:
parent
34eb856d09
commit
2ed8ebff09
2 changed files with 4 additions and 3 deletions
lbry/blob
|
@ -167,7 +167,7 @@ class AbstractBlob:
|
|||
with self.reader_context() as handle:
|
||||
try:
|
||||
return await self.loop.sendfile(writer.transport, handle, count=self.get_length())
|
||||
except (ConnectionResetError, BrokenPipeError, RuntimeError, OSError, AttributeError):
|
||||
except (ConnectionError, BrokenPipeError, RuntimeError, OSError, AttributeError):
|
||||
return -1
|
||||
|
||||
def decrypt(self, key: bytes, iv: bytes) -> bytes:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue