We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54632b3 commit 894e3ccCopy full SHA for 894e3cc
src/index.js
@@ -46,8 +46,10 @@ class FloodSub extends BaseProtocol {
46
if (err) return callback(err)
47
const idB58Str = peerInfo.id.toB58String()
48
const peer = this.peers.get(idB58Str)
49
- // Immediately send my own subscriptions to the newly established conn
50
- peer.sendSubscriptions(this.subscriptions)
+ if (peer && peer.isWritable) {
+ // Immediately send my own subscriptions to the newly established conn
51
+ peer.sendSubscriptions(this.subscriptions)
52
+ }
53
setImmediate(() => callback())
54
})
55
}
0 commit comments