From 3a0c7d06d1b5f5114aa1b082017c32e3e1973930 Mon Sep 17 00:00:00 2001 From: NIC619 Date: Sun, 3 Nov 2019 12:31:20 +0800 Subject: [PATCH] Update comment for `connection.close()` --- libp2p/network/swarm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libp2p/network/swarm.py b/libp2p/network/swarm.py index a697d7da..7bb40cee 100644 --- a/libp2p/network/swarm.py +++ b/libp2p/network/swarm.py @@ -248,8 +248,8 @@ class Swarm(INetwork): # TODO: Should be changed to close multisple connections, # if we have several connections per peer in the future. connection = self.connections[peer_id] - # NOTE: `connection.close` performs `del self.connections[peer_id]` for us, - # so we don't need to remove the entry here. + # NOTE: `connection.close` will perform `del self.connections[peer_id]` + # and `notify_disconnected` for us. await connection.close() logger.debug("successfully close the connection to peer %s", peer_id)