-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make sure that EventSourced timer is cancelled when persistent actor is stopped
#7693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure that EventSourced timer is cancelled when persistent actor is stopped
#7693
Conversation
| }); | ||
| } | ||
|
|
||
| protected override void PostStop() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
….com:Arkatufus/akka.net into akkadotnet#7692-fix-EventSourced-stuck-timer
Aaronontheweb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #7692
Changes
Keep track of the currently running timer
ICancelablein a private field instead of a closure variable and make sure that it is being cancelled insidePostStop()