always close the write handle

This commit is contained in:
Victor Shyba 2019-05-02 12:20:49 -03:00
parent ff2985cc80
commit 68d7328918

View file

@ -168,6 +168,10 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
except asyncio.CancelledError:
self.close()
raise
finally:
if self.writer and not self.writer.closed():
self.writer.close_handle()
self.writer = None
def connection_made(self, transport: asyncio.Transport):
self.transport = transport