handle ConnectionError and ValueError in blob sendfile

This commit is contained in:
Jack Robison 2020-02-03 20:01:17 -05:00
parent 34eb856d09
commit 2ed8ebff09
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
2 changed files with 4 additions and 3 deletions
lbry/blob

View file

@ -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: