Closed
Description
Currently the peer:disconnect event will be fired anytime a muxed connection to a peer is closed, https://github.com/libp2p/js-libp2p/blob/v0.24.3/src/index.js#L85. However, since it's possible to have an outbound and inbound connection to a peer, closing one of those still means we are connected to a that peer. Only when we no longer have a connection to a peer, should we emit the disconnect event.
Performing a check of the total connections for a given peer before emitting the disconnect event when we receive a muxed connection closed event, would enable us to only emit the event when all connections are closed.
Reference #299 (comment)