Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: is online is only online if libp2p is online #891

Merged
merged 4 commits into from
Jul 7, 2017
Merged

Conversation

pgte
Copy link
Contributor

@pgte pgte commented Jun 30, 2017

Also, when peer is discovered but not online yet (racing cond), delay dial until libp2p is online.

@Kubuxu Kubuxu added the status/in-progress In progress label Jun 30, 2017
@pgte
Copy link
Contributor Author

pgte commented Jun 30, 2017

Should fix #874

@pgte pgte requested a review from daviddias June 30, 2017 10:17
@pgte pgte changed the title fix: is online is only online if libp2p is online WIP: fix: is online is only online if libp2p is online Jun 30, 2017
@pgte pgte changed the title WIP: fix: is online is only online if libp2p is online fix: is online is only online if libp2p is online Jun 30, 2017
if (self.isOnline()) {
dial()
} else {
self._libp2pNode.once('online', dial)
Copy link
Member

Choose a reason for hiding this comment

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

Does this event exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, I knew I had another PR to submit...
See libp2p/js-libp2p#93

@pgte
Copy link
Contributor Author

pgte commented Jul 6, 2017

@daviddias daviddias merged commit 8b0f996 into master Jul 7, 2017
@daviddias daviddias deleted the fix/is-online branch July 7, 2017 13:27
@daviddias daviddias removed the status/in-progress In progress label Jul 7, 2017
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this pull request May 22, 2020
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.

3 participants