mirror of
https://github.com/logos-storage/nim-chronos.git
synced 2026-01-09 00:43:09 +00:00
fix: avoid completing future twise
This commit is contained in:
parent
c39c069680
commit
546cc36d79
@ -855,7 +855,7 @@ proc wait*[T](fut: Future[T], timeout = InfiniteDuration): Future[T] =
|
||||
|
||||
proc continuation(udata: pointer) {.gcsafe.} =
|
||||
if not(retFuture.finished()):
|
||||
if isNil(udata):
|
||||
if not(fut.finished()):
|
||||
# Timer exceeded first.
|
||||
fut.removeCallback(continuation)
|
||||
fut.cancel()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user