diff --git a/Broker/PeclFactory.php b/Broker/PeclFactory.php index 98ed69b..1b8ecfc 100644 --- a/Broker/PeclFactory.php +++ b/Broker/PeclFactory.php @@ -136,6 +136,10 @@ protected function getChannel(string $connection): \AMQPChannel $this->amqpConnections[$connection]->connect(); } + if (!$this->amqpConnections[$connection]->isConnected()) { + $this->amqpConnections[$connection]->connect(); + } + return new \AMQPChannel($this->amqpConnections[$connection]); } }