go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

Attempt to Close Sentinel when the NewFailoverClusterClient is Closed.

Open DevineLiu opened this issue 1 year ago • 2 comments

We should have a means to reclaim the sentinels' connection resources established by NewFailoverClusterClient.

DevineLiu avatar Apr 12 '24 08:04 DevineLiu

I didn't understand this PR. What does it mean?

monkey92t avatar Apr 13 '24 11:04 monkey92t

When using NewFailoverClusterClient for initialization, at line 788, the code initializes connections to the Sentinels, and at line 792, the client subscribes to the Sentinel. However, the long-lived connection between the client and the Sentinel doesn't get closed when Close is called on the ClusterClient returned by NewFailoverClient.

This issue occurs when the Close method is called on ClusterClient, and the long-lived connection to the Sentinel is not closed along with it.

DevineLiu avatar Apr 16 '24 12:04 DevineLiu