Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

fix: create separate events for connection tracking #328

Merged
merged 5 commits into from
Apr 10, 2019

Conversation

jacobheun
Copy link
Contributor

The peer-mux-* events are currently used for both connection tracking and muxed connection tracking. This creates a problem for the Connection Manager because it won't be able to track unmuxed connections.

The Connection Manager should be aware of all connections that are created and closed. This adds events for libp2p and subsequently the Connection Manager to hook into.

@ghost ghost assigned jacobheun Apr 10, 2019
@ghost ghost added the in progress label Apr 10, 2019
Copy link

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the right thing to do 👍

I left a couple of comments in the code

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/connection/manager.js Show resolved Hide resolved
@jacobheun jacobheun marked this pull request as ready for review April 10, 2019 16:36
@jacobheun jacobheun merged commit 72cdf35 into feat/priority-queue Apr 10, 2019
@ghost ghost removed the in progress label Apr 10, 2019
@jacobheun jacobheun deleted the fix/connection-emits branch April 10, 2019 16:37
jacobheun added a commit to libp2p/js-libp2p-connection-manager that referenced this pull request Apr 10, 2019
BREAKING CHANGE: This migrates from using muxed events from libp2p
to the new connection events introduced in libp2p/js-libp2p-switch#328.
This enables the connection manager to have better information about
the number of connections
vasco-santos pushed a commit to libp2p/js-libp2p-connection-manager that referenced this pull request Apr 11, 2019
BREAKING CHANGE: This migrates from using muxed events from libp2p
to the new connection events introduced in libp2p/js-libp2p-switch#328.
This enables the connection manager to have better information about
the number of connections
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants