diff --git a/chronos/asyncproc.nim b/chronos/asyncproc.nim index 572e382..07f4d06 100644 --- a/chronos/asyncproc.nim +++ b/chronos/asyncproc.nim @@ -996,7 +996,7 @@ else: return if not(isNil(timer)): clearTimer(timer) - let exitCode = p.peekProcessExitCode().valueOr: + let exitCode = p.peekProcessExitCode(reap = true).valueOr: retFuture.fail(newException(AsyncProcessError, osErrorMsg(error))) return if exitCode == -1: