fix: Asynchronous task [sendMsgSlow()] was cancelled [FutureDefect] (#1094)

This commit is contained in:
diegomrsantos 2024-05-07 15:44:14 +02:00 committed by GitHub
parent 84659af45b
commit 88e233db81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,7 @@ proc sendMsgSlow(p: PubSubPeer, msg: seq[byte]) {.async.} =
if p.sendConn == nil:
# Wait for a send conn to be setup. `connectOnce` will
# complete this even if the sendConn setup failed
await p.connectedFut
discard await race(p.connectedFut)
var conn = p.sendConn
if conn == nil or conn.closed():