catch sendfile errors

This commit is contained in:
Jack Robison 2019-01-31 16:03:28 -05:00
parent 6e69d306de
commit aa7f0845cc
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -60,7 +60,7 @@ class BlobServerProtocol(asyncio.Protocol):
log.info("send %s to %s:%i", blob.blob_hash[:8], peer_address, peer_port)
try:
sent = await blob.sendfile(self)
except ConnectionResetError:
except (ConnectionResetError, BrokenPipeError, RuntimeError, OSError):
return
log.info("sent %s (%i bytes) to %s:%i", blob.blob_hash[:8], sent, peer_address, peer_port)
if responses: