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…
Reference in New Issue