calling close causes AssertionError

This commit is contained in:
Christian Ulrich 2020-07-22 01:32:04 +02:00
parent 12ef92dfe9
commit 32ecd8074c
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 0 additions and 2 deletions

View File

@ -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)