handle dht is_closing
This commit is contained in:
parent
63bf084a6a
commit
33a68b5cef
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue