From 0a08f445a462774eb8224a944b830149424c13a2 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 1 Feb 2019 11:38:10 -0500 Subject: [PATCH] close blob server transport on sendfile failing --- lbrynet/blob_exchange/server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbrynet/blob_exchange/server.py b/lbrynet/blob_exchange/server.py index 0ddcbc875..32cdf51fe 100644 --- a/lbrynet/blob_exchange/server.py +++ b/lbrynet/blob_exchange/server.py @@ -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: