diff --git a/src/SnmpDiscoveryCollector.class.inc.php b/src/SnmpDiscoveryCollector.class.inc.php index 9836113..efcfbb8 100644 --- a/src/SnmpDiscoveryCollector.class.inc.php +++ b/src/SnmpDiscoveryCollector.class.inc.php @@ -1,6 +1,7 @@ bDistributed && !empty($this->aIPAddresses)) { // Wait until new message arrives - $this->oChannel->consume(); + try { + $this->oChannel->wait(timeout: 60); + } catch (AMQPTimeoutException $e) { + $this->oChannel->queue_purge($this->sQueue); + throw $e; + } $sBody = $this->oResponseMessage->getBody(); $iKey = $this->oResponseMessage->get('correlation_id');