Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure identify streams are closed #551

Merged
merged 4 commits into from
Feb 5, 2020

Conversation

jacobheun
Copy link
Contributor

@jacobheun jacobheun commented Feb 5, 2020

  • Identify streams were not being closed properly. They were either being only read from or written to, which would lave them half open. This adds tests to check for open streams after identify runs and fixes it for both identify and identify push.
  • connection.addStream() wasn't being called properly in the Upgrader. This resulted in protocols being tracked as undefined. It was also tracking the multistream selected stream, instead of the MuxedStream. The call now matches the connection interface https://github.com/libp2p/js-interfaces/tree/master/src/connection#add-stream-metadata.

@jacobheun jacobheun marked this pull request as ready for review February 5, 2020 12:22
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.

This LGTM!

src/identify/index.js Outdated Show resolved Hide resolved
src/identify/index.js Outdated Show resolved Hide resolved
@jacobheun jacobheun merged commit f662fdc into master Feb 5, 2020
@jacobheun jacobheun deleted the fix/identify-stream-closing branch February 5, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants