Skip to content

Change idle timeout to track last activity - #5521

Merged
aasoni merged 3 commits into
aasoni/ws-idle-timeout-reworkfrom
jsdt/ws-idle-timeout-tweak
Jul 20, 2026
Merged

Change idle timeout to track last activity#5521
aasoni merged 3 commits into
aasoni/ws-idle-timeout-reworkfrom
jsdt/ws-idle-timeout-tweak

Conversation

@jsdt

@jsdt jsdt commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Instead of passing around part of a watch to extend the timeout, this change adds a last_activity field to ActorState. It can be updated by calling record_activity() on the actor state, and you can get an idle timeout future by calling idle_timer on the actor state. IMO this is a bit more straightforward, and it reduces how many arguments we are passing around.

Expected complexity level and risk

Testing

I updated the existing unit tests.

@aasoni
aasoni marked this pull request as ready for review July 20, 2026 13:12
@aasoni
aasoni merged commit c81264b into aasoni/ws-idle-timeout-rework Jul 20, 2026
33 of 36 checks passed
aasoni pushed a commit that referenced this pull request Aug 12, 2026
Instead of passing around part of a watch to extend the timeout, this
change adds a `last_activity` field to `ActorState`. It can be updated
by calling `record_activity()` on the actor state, and you can get an
idle timeout future by calling `idle_timer` on the actor state. IMO this
is a bit more straightforward, and it reduces how many arguments we are
passing around.
aasoni pushed a commit that referenced this pull request Aug 18, 2026
Instead of passing around part of a watch to extend the timeout, this
change adds a `last_activity` field to `ActorState`. It can be updated
by calling `record_activity()` on the actor state, and you can get an
idle timeout future by calling `idle_timer` on the actor state. IMO this
is a bit more straightforward, and it reduces how many arguments we are
passing around.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants