Skip to content

[Messenger] Avoid reconnecting active Redis connections. #52896

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

Merged
merged 1 commit into from
Dec 8, 2023
Merged

[Messenger] Avoid reconnecting active Redis connections. #52896

merged 1 commit into from
Dec 8, 2023

Conversation

BusterNeece
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #45057
License MIT

With the Messenger component's internal Redis Connection class, if you pass it a \Redis or \Relay instance that's already connected, it will still try to reconnect that instance using the host/port/etc. that's passed to the connection object's "options" array in the constructor.

Not only does this cause problems when the Redis instance is already connected, but it also prevents you from, say, using socket connections instead (as the only connection method supported by the class itself is IP-based connections) and just passing in a ready-to-go Redis instance.

This PR is a resubmission of #52811 targeting 5.4 as it's a bug fix.

@fabpot
Copy link
Member

fabpot commented Dec 8, 2023

Thank you @BusterNeece.

@fabpot fabpot merged commit 8c56020 into symfony:5.4 Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants