diff --git a/lbrynet/dht/protocol/protocol.py b/lbrynet/dht/protocol/protocol.py index 39e80870e..f1aab10ad 100644 --- a/lbrynet/dht/protocol/protocol.py +++ b/lbrynet/dht/protocol/protocol.py @@ -544,7 +544,7 @@ class KademliaProtocol(DatagramProtocol): async def _send(self, peer: 'KademliaPeer', message: typing.Union[RequestDatagram, ResponseDatagram, ErrorDatagram]): - if not self.transport: + if not self.transport or self.transport.is_closing(): raise TransportNotConnected() data = message.bencode()