mirror of https://github.com/vacp2p/nim-quic.git
doesn't fail loop fut if it is already finished
This commit is contained in:
parent
7e450f15cc
commit
892f874d2b
|
@ -58,7 +58,8 @@ proc startSending(connection: Connection, remote: TransportAddress) =
|
|||
except TransportError as e:
|
||||
trace "Failed to send datagram", errorMsg = e.msg
|
||||
trace "Failing connection loop future with error"
|
||||
connection.loop.fail(e) # This might need to be revisited, see https://github.com/status-im/nim-quic/pull/41 for more details
|
||||
if not connection.loop.finished:
|
||||
connection.loop.fail(e) # This might need to be revisited, see https://github.com/status-im/nim-quic/pull/41 for more details
|
||||
await connection.drop()
|
||||
connection.loop = asyncLoop(send)
|
||||
|
||||
|
|
Loading…
Reference in New Issue