/** * Class destructor. */ public function __destruct() { if ($this->amqConnection) { if ($this->requestChannel) { $this->requestChannel->close(); } if ($this->resultChannel) { $this->resultChannel->close(); } $this->amqConnection->close(); Common::$lg->addDebug("Closed connection to AMQ"); } }