diff --git a/src/Subscriber.php b/src/Subscriber.php index 4bb8027..4289405 100644 --- a/src/Subscriber.php +++ b/src/Subscriber.php @@ -98,6 +98,14 @@ private function connect(): Promise $this->connect = null; + if (!$connectException instanceof RedisException) { + $connectException = new RedisException( + 'Connecting to redis server failed: ' . $connectException->getMessage(), + 0, + $connectException + ); + } + throw $connectException; }