mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Update comment for connection.close()
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user