js-libp2p
js-libp2p copied to clipboard
[switch] closing mutliplexed connections
Its would be nice to have an easy way to tell if a multiplexed connection is still in use by a protocol or not. This is needed to be able to close unneeded connections.
related to https://github.com/libp2p/js-libp2p-connection-manager/issues/16
The connection has a streams property that lets you know how many streams are open/in-use. That can be used to determine wether the connection is in use or not. Closing for now.