forked from LBRYCommunity/lbry-sdk
Merge pull request #1840 from lbryio/close-transport-on-sendfile-fail
close blob server transport on sendfile failing
This commit is contained in:
commit
4e3b529aec
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,8 @@ class BlobServerProtocol(asyncio.Protocol):
|
|||
try:
|
||||
sent = await blob.sendfile(self)
|
||||
except (ConnectionResetError, BrokenPipeError, RuntimeError, OSError):
|
||||
if self.transport:
|
||||
self.transport.close()
|
||||
return
|
||||
log.info("sent %s (%i bytes) to %s:%i", blob.blob_hash[:8], sent, peer_address, peer_port)
|
||||
if responses:
|
||||
|
|
Loading…
Reference in a new issue