diff --git a/chronos/asyncfutures2.nim b/chronos/asyncfutures2.nim index b55b0416..8f7f8b65 100644 --- a/chronos/asyncfutures2.nim +++ b/chronos/asyncfutures2.nim @@ -531,13 +531,11 @@ proc mget*[T](future: FutureVar[T]): var T = result = Future[T](future).value proc asyncCheck*[T](future: Future[T]) = - ## Sets a callback on ``future`` which raises an exception if the future - ## finished with an error. - ## - ## This should be used instead of ``discard`` to discard void futures. + ## Sets a callback on ``future`` which raises an exception in ``poll()`` if the + ## future failed. doAssert(not isNil(future), "Future is nil") proc cb(data: pointer) = - if future.failed() or future.cancelled(): + if future.failed(): when defined(chronosStackTrace): injectStacktrace(future) raise future.error