IcingaRedis: Don't throw in method isUnavailable

fixes #883
This commit is contained in:
Johannes Meyer 2023-09-27 09:54:47 +02:00
parent f6e808bac1
commit cd41a207a1

View file

@ -44,8 +44,12 @@ class IcingaRedis
{
$self = self::instance();
if ($self->redis === null) {
$self->getConnection();
if (! $self->redisUnavailable && $self->redis === null) {
try {
$self->getConnection();
} catch (Exception $_) {
// getConnection already logs the error
}
}
return $self->redisUnavailable;