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: bail when discovering self #357

Merged
merged 1 commit into from
Apr 16, 2019
Merged

fix: bail when discovering self #357

merged 1 commit into from
Apr 16, 2019

Conversation

jacobheun
Copy link
Contributor

fixes #356

If a discovery service causes us to discover ourselves, dont do anything. This also logs out an error so that we can trace the discovery back to the module that did it.

Note, since not all modules currently have access to self.peerInfo they can't avoid emitting it, so we need to prevent that here.

ref libp2p/js-libp2p-webrtc-star#171 (comment)

@ghost ghost assigned jacobheun Apr 15, 2019
@ghost ghost added the status/in-progress In progress label Apr 15, 2019
@jacobheun jacobheun requested a review from vasco-santos April 15, 2019 12:40
@jacobheun jacobheun mentioned this pull request Apr 15, 2019
Copy link
Contributor

@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.

One nit but LGTM 👍

src/index.js Show resolved Hide resolved
@jacobheun jacobheun merged commit f28dffb into master Apr 16, 2019
@jacobheun jacobheun deleted the fix/discover-self branch April 16, 2019 10:05
@ghost ghost removed the status/in-progress In progress label Apr 16, 2019
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.

Dont discover self
2 participants