Skip to content

Commit a180815

Browse files
committed
testing to see if this fixes failure in ci
1 parent 8806166 commit a180815

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

codex/utils/asyncstatemachine.nim

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ proc start*(machine: Machine, initialState: State) =
9090
machine.scheduled = newAsyncQueue[Event]()
9191

9292
machine.started = true
93-
machine.scheduler()
94-
.track(machine)
95-
.cancelled(proc() = trace("machine.scheduler cancelled, swallowing"))
96-
.catch((err: ref CatchableError) =>
97-
error("Error in scheduler", error = err.msg)
98-
)
99-
machine.schedule(Event.transition(machine.state, initialState))
93+
try:
94+
discard machine.scheduler().track(machine)
95+
machine.schedule(Event.transition(machine.state, initialState))
96+
except CancelledError as e:
97+
discard
98+
except CatchableError as e:
99+
error("Error in scheduler", error = e.msg)
100100

101101
proc stop*(machine: Machine) {.async.} =
102102
if not machine.started:

0 commit comments

Comments
 (0)