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 trace "publishing on topic", name = topic
g.mcache.put(msg) g.mcache.put(msg)
sent.add(g.peers[p].send(@[RPCMsg(messages: @[msg])])) sent.add(g.peers[p].send(@[RPCMsg(messages: @[msg])]))
checkFutures(await allFinished(sent))
sent = await allFinished(sent)
checkFutures(sent)
method start*(g: GossipSub) {.async.} = method start*(g: GossipSub) {.async.} =
## start pubsub ## start pubsub