diff --git a/codex/utils/asyncstatemachine.nim b/codex/utils/asyncstatemachine.nim index 27d09b64..512617ee 100644 --- a/codex/utils/asyncstatemachine.nim +++ b/codex/utils/asyncstatemachine.nim @@ -73,8 +73,9 @@ proc scheduler(machine: Machine) {.async.} = if next =? event(machine.state): if not running.isNil and not running.finished: await running.cancelAndWait() + let fromState = if machine.state.isNil: "" else: $machine.state machine.state = next - debug "enter state", state = machine.state + debug "enter state", state = machine.state, fromState running = machine.run(machine.state) running .track(machine)