diff --git a/asyncutils.nim b/asyncutils.nim index 02bf50d..51baf95 100644 --- a/asyncutils.nim +++ b/asyncutils.nim @@ -34,10 +34,8 @@ proc asyncExecCmd*(command: string): Future[string] = (result, exitCode) = execCmdEx(command) if exitCode != 0: failureEvent.trigger() - successEvent.unregister() else: successEvent.trigger() - failureEvent.unregister() let flowVar = spawn execCmdBackground(successEvent, failureEvent, command) proc successCallback(fd: AsyncFD): bool = future.complete(^flowVar)