diff --git a/libp2p/protocols/pubsub/gossipsub.nim b/libp2p/protocols/pubsub/gossipsub.nim index c2584afa0..5d70970ca 100644 --- a/libp2p/protocols/pubsub/gossipsub.nim +++ b/libp2p/protocols/pubsub/gossipsub.nim @@ -429,9 +429,7 @@ method publish*(g: GossipSub, trace "publishing on topic", name = topic g.mcache.put(msg) sent.add(g.peers[p].send(@[RPCMsg(messages: @[msg])])) - - sent = await allFinished(sent) - checkFutures(sent) + checkFutures(await allFinished(sent)) method start*(g: GossipSub) {.async.} = ## start pubsub