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

Commit

Permalink
libp2p new state interface
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Jul 6, 2017
1 parent cd3b754 commit 3bc8a88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/components/is-online.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module.exports = function isOnline (self) {
return () => {
return Boolean(self._bitswap && self._libp2pNode && self._libp2pNode.isOn())
return Boolean(self._bitswap && self._libp2pNode && self._libp2pNode.isStarted())
}
}
2 changes: 1 addition & 1 deletion src/core/components/libp2p.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function libp2p (self) {
if (self.isOnline()) {
dial()
} else {
self._libp2pNode.once('online', dial)
self._libp2pNode.once('start', dial)
}
})

Expand Down

0 comments on commit 3bc8a88

Please sign in to comment.