Skip to content

Enabled the connection to be released.#43

Merged
xin9le merged 9 commits intoxin9le:mainfrom
aetos382:dispose
Feb 7, 2025
Merged

Enabled the connection to be released.#43
xin9le merged 9 commits intoxin9le:mainfrom
aetos382:dispose

Conversation

@aetos382
Copy link
Contributor

@aetos382 aetos382 commented Feb 4, 2025

I implemented IDisposable in RedisConnection and added a ReleaseConnection method so that the internal ConnectionMultiplexer could be released.

For example, if using Redis on Amazon Elasticache, StackExchange.Redis will not detect that a node has failed over and will not automatically connect to the new node.
Therefore, it is necessary to destroy and recreate the ConnectionMultiplexer instance, but RedisConnection did not support this functionality.

This patch makes it possible.

see: https://tech.guitarrapc.com/entry/2025/01/25/235900
see: StackExchange/StackExchange.Redis#1874

@xin9le xin9le self-requested a review February 4, 2025 13:25
Copy link
Owner

@xin9le xin9le left a comment

Choose a reason for hiding this comment

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

@aetos382
Thank you very much for your excellent assistance. I have requested minor adjustments for your review and confirmation.

@aetos382 aetos382 requested a review from xin9le February 7, 2025 08:24
Copy link
Owner

@xin9le xin9le left a comment

Choose a reason for hiding this comment

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

Thanks!!

@xin9le xin9le merged commit 585be59 into xin9le:main Feb 7, 2025
@aetos382 aetos382 deleted the dispose branch February 7, 2025 11:52
@xin9le xin9le mentioned this pull request Feb 8, 2025
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