Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
fix: _dialPeer always calls back
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Jul 6, 2017
1 parent d1b10cf commit bccffd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ class FloodSub extends EventEmitter {
// If already have a PubSub conn, ignore
const peer = this.peers.get(idB58Str)
if (peer && peer.isConnected) {
return
return callback()
}

this.libp2p.dial(peerInfo, multicodec, (err, conn) => {
if (err) {
return log.err(err)
log.err(err)
return callback()
}

this._onDial(peerInfo, conn, callback)
Expand Down

0 comments on commit bccffd6

Please sign in to comment.