From a156a3f73b21f60f59befe16cef522b8d1f2e688 Mon Sep 17 00:00:00 2001 From: Dariusz Gafka Date: Tue, 27 Aug 2024 20:32:13 +0200 Subject: [PATCH] initialize --- packages/Amqp/src/AmqpInboundChannelAdapter.php | 2 +- packages/Enqueue/src/EnqueueInboundChannelAdapter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Amqp/src/AmqpInboundChannelAdapter.php b/packages/Amqp/src/AmqpInboundChannelAdapter.php index 7a6aa3574..9b46b0d8e 100644 --- a/packages/Amqp/src/AmqpInboundChannelAdapter.php +++ b/packages/Amqp/src/AmqpInboundChannelAdapter.php @@ -103,7 +103,7 @@ public function receiveWithTimeout(int $timeout = 0): ?Message $subscriptionConsumer->consume($timeout ?: $this->receiveTimeoutInMilliseconds); return $this->queueChannel->receive(); - } catch (AMQPConnectionException $exception) { + } catch (AMQPConnectionException|\AMQPChannelException $exception) { throw new ConnectionException('Failed to connect to AMQP broker', 0, $exception); } } diff --git a/packages/Enqueue/src/EnqueueInboundChannelAdapter.php b/packages/Enqueue/src/EnqueueInboundChannelAdapter.php index 0f7813877..287f0f4e4 100644 --- a/packages/Enqueue/src/EnqueueInboundChannelAdapter.php +++ b/packages/Enqueue/src/EnqueueInboundChannelAdapter.php @@ -83,7 +83,7 @@ abstract public function connectionException(): string; private function isConnectionException(Exception $exception): bool { - return is_subclass_of($exception, $this->connectionException()) || $exception::class === $this->connectionException() || $exception instanceof ConnectionException; + return is_subclass_of($exception, $this->connectionException()) || $exception::class === $this->connectionException(); } public function getQueueName(): string