go-redis
go-redis copied to clipboard
Attempt to Close Sentinel when the NewFailoverClusterClient is Closed.
We should have a means to reclaim the sentinels' connection resources established by NewFailoverClusterClient.
I didn't understand this PR. What does it mean?
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.