Update comment for connection.close()

This commit is contained in:
NIC619 2019-11-03 12:31:20 +08:00
parent 285bb2ed19
commit 3a0c7d06d1
No known key found for this signature in database
GPG Key ID: 570C35F5C2D51B17

View File

@ -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)