mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-15 23:20:51 +00:00
**Motivation** In lodestar, when we handle "peer:connect" event, we dial the peer which gives another "peer:connect" event and it causes other issues **Motivation** In `onConnect` function, "peer:connect" event should be emitted after we add connection to the `connections` map so that when app dial the peer in "peer:connect" event handler, it uses the same/existing connection