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)