From 32ecd8074cdcb2f3ebc40b7319a54dbcffc80ec0 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Wed, 22 Jul 2020 01:32:04 +0200 Subject: [PATCH] calling close causes AssertionError --- asyncutils.nim | 2 -- 1 file changed, 2 deletions(-) diff --git a/asyncutils.nim b/asyncutils.nim index 1813486..4e1e6e3 100644 --- a/asyncutils.nim +++ b/asyncutils.nim @@ -33,10 +33,8 @@ proc asyncExecCmd*(command: string): Future[string] = (result, exitCode) = execCmdEx(command) if exitCode != 0: failureEvent.trigger() - successEvent.close() # FIXME: is close the right way to cancel an event? else: successEvent.trigger() - failureEvent.close() # FIXME: is close the right way to cancel an event? let flowVar = spawn execCmdBackground(successEvent, failureEvent, command) proc successCallback(fd: AsyncFD): bool = future.complete(^flowVar)