Skip to content

Commit dfaa3fd

Browse files
authored
fix: rpc control messages 0.5.x (#131)
1 parent e82ce00 commit dfaa3fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ts/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ class Gossipsub extends BasicPubsub {
192192
const prune = this._handleGraft(peer, controlMsg.graft)
193193
this._handlePrune(peer, controlMsg.prune)
194194

195-
if (!iwant || !ihave || !prune) {
195+
if (!iwant && !ihave && !prune) {
196196
return
197197
}
198198

199-
const outRpc = createGossipRpc(ihave, { iwant: [iwant], prune })
199+
const outRpc = createGossipRpc(ihave, { iwant: iwant && [iwant], prune })
200200
this._sendRpc(peer, outRpc)
201201
}
202202

0 commit comments

Comments
 (0)