You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TransportManager stores listeners on the underlying Transport object itself. This causes strange things to happen if, for example, the Transport implementation extends EventEmitter (as it does in peer-base) because EventEmitter has a method called listeners() which gets clobbered.
Currently Switch has an object called transports whose keys are transport names (eg 'tcp') and values are the Transport implementations themselves. I suggest adding a level of indirection such that the values have an object like this:
The only complicating factor would be if there are libraries that depend on libp2p-switch and reference Switch.transports. As far as I can tell there are no references elsewhere in libp2p.