diff --git a/src/Connection/SocketRedisConnector.php b/src/Connection/SocketRedisConnector.php index b86c96d..02898cd 100644 --- a/src/Connection/SocketRedisConnector.php +++ b/src/Connection/SocketRedisConnector.php @@ -36,6 +36,9 @@ public function connect(?Cancellation $cancellation = null): RedisConnection try { $socketConnector = $this->socketConnector ?? Socket\socketConnector(); $socket = $socketConnector->connect($this->uri, $this->connectContext, $cancellation); + if ($this->connectContext->getTlsContext()) { + $socket->setupTls($cancellation); + } } catch (Socket\SocketException $e) { throw new RedisConnectionException( 'Failed to connect to redis instance (' . $this->uri . ')',