mirror of https://github.com/vacp2p/nim-libp2p.git
fix: Asynchronous task [sendMsgSlow()] was cancelled [FutureDefect] (#1094)
This commit is contained in:
parent
84659af45b
commit
88e233db81
|
@ -304,7 +304,7 @@ proc sendMsgSlow(p: PubSubPeer, msg: seq[byte]) {.async.} =
|
||||||
if p.sendConn == nil:
|
if p.sendConn == nil:
|
||||||
# Wait for a send conn to be setup. `connectOnce` will
|
# Wait for a send conn to be setup. `connectOnce` will
|
||||||
# complete this even if the sendConn setup failed
|
# complete this even if the sendConn setup failed
|
||||||
await p.connectedFut
|
discard await race(p.connectedFut)
|
||||||
|
|
||||||
var conn = p.sendConn
|
var conn = p.sendConn
|
||||||
if conn == nil or conn.closed():
|
if conn == nil or conn.closed():
|
||||||
|
|
Loading…
Reference in New Issue