close blob server transport on sendfile failing
This commit is contained in:
parent
3eac99c509
commit
0a08f445a4
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,8 @@ class BlobServerProtocol(asyncio.Protocol):
|
||||||
try:
|
try:
|
||||||
sent = await blob.sendfile(self)
|
sent = await blob.sendfile(self)
|
||||||
except (ConnectionResetError, BrokenPipeError, RuntimeError, OSError):
|
except (ConnectionResetError, BrokenPipeError, RuntimeError, OSError):
|
||||||
|
if self.transport:
|
||||||
|
self.transport.close()
|
||||||
return
|
return
|
||||||
log.info("sent %s (%i bytes) to %s:%i", blob.blob_hash[:8], sent, peer_address, peer_port)
|
log.info("sent %s (%i bytes) to %s:%i", blob.blob_hash[:8], sent, peer_address, peer_port)
|
||||||
if responses:
|
if responses:
|
||||||
|
|
Loading…
Reference in a new issue