pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 525 forks source link

AsyncTimeout.on_timeout is not triggered after timeout has passed #580

Closed Rysbai closed 1 year ago

Rysbai commented 1 year ago

This https://github.com/pytransitions/transitions/pull/579 should fix this problem.

Describe the bug I wanted to initialise AsyncTimeout state with timeout=0, so I can set timeout after initialisation before/after entering state. But trigger is not called after setting timeout > 0, entering the state and timeout has passed.

So in my project, I set on_timeout along with the timeout before entering to state and it's working.

Minimal working example

Expected behavior AsyncTImeout.on_timeout has to be triggered.

Actual behavior Nothing happens