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

Commit

Permalink
feat: loose connect a bit for websockets in the browser
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Mar 31, 2017
1 parent 5e189de commit c4e9902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PeerInfo {
// only stores the current multiaddr being used
connect (ma) {
ma = ensureMultiaddr(ma)
if (!this.multiaddrs.has(ma)) {
if (!this.multiaddrs.has(ma) && ma.toString() !== `/ipfs/${this.id.toB58String()}`) {
throw new Error('can\'t be connected to missing multiaddr from set')
}
this._connectedMultiaddr = ma
Expand Down

0 comments on commit c4e9902

Please sign in to comment.