Skip to content

Conversation

@Arkatufus
Copy link
Contributor

Fixes #7692

Changes

Keep track of the currently running timer ICancelable in a private field instead of a closure variable and make sure that it is being cancelled inside PostStop()

});
}

protected override void PostStop()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an aroundpoststop or something we can call that can't be overridden by end-users?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, though user can still override AroundPostStop() if they want to since it isn't sealed

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) June 12, 2025 17:44
@Aaronontheweb Aaronontheweb merged commit 95ee316 into akkadotnet:dev Jun 12, 2025
11 checks passed
@Arkatufus Arkatufus deleted the #7692-fix-EventSourced-stuck-timer branch June 20, 2025 13:54
This was referenced Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EventSourced actors failed to clean up its timer on death

2 participants