From 802299e69a1808bdb50df55882c17322e63979c3 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Tue, 26 May 2020 00:17:25 -0600 Subject: [PATCH] breakout from publish loop --- libp2p/protocols/pubsub/gossipsub.nim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libp2p/protocols/pubsub/gossipsub.nim b/libp2p/protocols/pubsub/gossipsub.nim index c2584af..5d70970 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