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

feat: use new connection emitters #19

Merged
merged 6 commits into from
Apr 11, 2019
Merged

Conversation

jacobheun
Copy link
Contributor

@jacobheun jacobheun commented 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

Also:

I am currently using a branch of libp2p to run the tests against, github:libp2p/js-libp2p#fix/connection-emits. I'll revert this once the tests are passing. We'll need to do a minor release of this and then update the dependency there. There is some code in the tests, https://github.com/libp2p/js-libp2p-connection-manager/pull/19/files#diff-bcc7ab6635870331d32d00bfc1716612R34, that should allow testing to pass for both libp2p versions until libp2p is released and can be updated here. (Ideally we should be stubbing libp2p to avoid the circular dependency).

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
@ghost ghost assigned jacobheun Apr 10, 2019
@ghost ghost added the in progress label Apr 10, 2019
@jacobheun jacobheun marked this pull request as ready for review April 10, 2019 18:43
@jacobheun
Copy link
Contributor Author

@vasco-santos the tests here are failing, but it's due to an issue with switch that's fixed in the upcoming version of libp2p. Since we have a circular dependency right now with libp2p our options are limited since it's a breaking change. I think it would be best to do a minor release of this and then do a followup PR here once libp2p has shipped. What are your thoughts?

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM @jacobheun

I am on the same page as you. Release a minor release with this and then a new PR once libp2p has shipped

@vasco-santos vasco-santos merged commit 8f6a40a into master Apr 11, 2019
@vasco-santos vasco-santos deleted the fix/connection-events branch April 11, 2019 09:02
@ghost ghost removed the in progress label Apr 11, 2019
@vasco-santos
Copy link
Member

Released [email protected] 🚢

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