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: prevent "The libp2p node is not started yet" when stopping #138

Merged
merged 1 commit into from
Dec 15, 2017

Conversation

pgte
Copy link
Contributor

@pgte pgte commented Dec 14, 2017

When issuing a node.stop(), some asynchronous actions may still be happening, which sometimes originates random "The libp2p node is not started yet" errors.

This prevents that by assuming the node is only stopped after the stopping process is complete.

@ghost ghost assigned pgte Dec 14, 2017
@ghost ghost added the status/in-progress In progress label Dec 14, 2017
Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

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

🌟

@daviddias
Copy link
Member

Nice! good catch!

@daviddias daviddias merged commit c88eaf4 into master Dec 15, 2017
@daviddias daviddias deleted the fix/stop branch December 15, 2017 07:08
@ghost ghost removed the status/in-progress In progress label Dec 15, 2017
jacobheun pushed a commit to jacobheun/js-libp2p that referenced this pull request Jul 29, 2019
maschad added a commit to maschad/js-libp2p that referenced this pull request Jun 21, 2023
…2p#134)

* fix: added peer connection state listener to emit closed events

* fix: updated listening event name for disconnect/closed events (libp2p#138)

* fix: removed listener once connection is closed (libp2p#138)

* fix: removed listener once connection is closed (libp2p#138)
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Jun 21, 2023
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.

2 participants