8000 [Messenger] Avoid reconnecting active Redis connections. by BusterNeece · Pull Request #52896 · symfony/symfony · GitHub
[go: up one dir, main page]

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bug #45057 [Messenger] Avoid reconnecting active Redis connections.
  • Loading branch information
BusterNeece committed Dec 5, 2023
commit 650f1532ff37e4f872e6cb125c1bcae325681258
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ public function __construct(array $configuration, array $connectionCredentials =
*/
private static function initializeRedis(\Redis $redis, string $host, int $port, $auth, int $serializer, int $dbIndex): \Redis
{
if ($redis->isConnected()) {
return $redis;
}

$redis->connect($host, $port);
$redis->setOption(\Redis::OPT_SERIALIZER, $serializer);

Expand Down
0