Skip to content

Commit

Permalink
make protocol binding synchronous. Should fix ipfs/js-ipfs/issues/944
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Aug 16, 2017
1 parent 8b22cf2 commit 866b063
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ class PubSubRoom extends EventEmitter {
throw new Error('This IPFS node does not have pubsub.')
}

if (this._ipfs.isOnline()) {
this._start()
}
this._ipfs.on('ready', this._start.bind(this))
// if (this._ipfs.isOnline()) {
// this._start()
// }
// this._ipfs.on('ready', this._start.bind(this))

this._ipfs.on('stop', this.leave.bind(this))

this._start()
}

getPeers () {
Expand Down

0 comments on commit 866b063

Please sign in to comment.