Skip to content

Conversation

@ewisuri
Copy link
Contributor

@ewisuri ewisuri commented May 7, 2022

In the Sentinel Connection Multiplexer, since OnManagedConnectionRestored can be executed on a different thread, it's possible for it to dispose the timer just before OnManagedConnectionFailed calls .Change() on the timer, which leads to an ObjectDisposedException being thrown in OnManagedConnectionFailed. Since the connection was restored, it seems safe to suppress these exceptions, instead of requiring locking around the reference to connection.sentinelPrimaryReconnectTimer.

@NickCraver NickCraver self-assigned this May 10, 2022
Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

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

Looking good - thanks for the fix here!

@NickCraver NickCraver merged commit dc9a9b6 into StackExchange:main May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants