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

Commit c4e9902

Browse files
committed
feat: loose connect a bit for websockets in the browser
1 parent 5e189de commit c4e9902

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PeerInfo {
1919
// only stores the current multiaddr being used
2020
connect (ma) {
2121
ma = ensureMultiaddr(ma)
22-
if (!this.multiaddrs.has(ma)) {
22+
if (!this.multiaddrs.has(ma) && ma.toString() !== `/ipfs/${this.id.toB58String()}`) {
2323
throw new Error('can\'t be connected to missing multiaddr from set')
2424
}
2525
this._connectedMultiaddr = ma

0 commit comments

Comments
 (0)