From 84396a64da02124462371737cfcef9e5b104fe02 Mon Sep 17 00:00:00 2001 From: Maxime Besson Date: Mon, 7 Jul 2025 16:24:22 +0200 Subject: [PATCH] Report SSL_ERROR during connection --- lib/Redis.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Redis.pm b/lib/Redis.pm index 62bcb21..794367c 100644 --- a/lib/Redis.pm +++ b/lib/Redis.pm @@ -752,7 +752,8 @@ sub __build_sock { } while (!$self->{sock} && $! == Errno::EINTR); unless ($self->{sock}) { - croak("Could not connect to Redis server at $self->{server}: $!"); + my $e = $! || $IO::Socket::SSL::SSL_ERROR || "unknown error"; + croak("Could not connect to Redis server at $self->{server}: $e"); } $self->{__buf} = '';