breakout from publish loop

This commit is contained in:
Dmitriy Ryajov 2020-05-26 00:17:25 -06:00
parent 7e31210455
commit 802299e69a
1 changed files with 1 additions and 3 deletions

View File

@ -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