Support failover API command transport configuration

fixes #13957
This commit is contained in:
Eric Lippmann 2017-01-12 10:39:36 +01:00
parent 642015c294
commit cde55b5764
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
namespace Icinga\Module\Monitoring\Command\Transport;
use Exception;
use Icinga\Application\Config;
use Icinga\Application\Logger;
use Icinga\Data\ConfigObject;
@ -122,7 +123,7 @@ class CommandTransport implements CommandTransportInterface
if ($this->transferPossible($command, $transport)) {
try {
$transport->send($command, $now);
} catch (CommandTransportException $e) {
} catch (Exception $e) {
Logger::error($e);
$errors[] = sprintf('%s: %s.', $name, rtrim($e->getMessage(), '.'));
continue; // Try the next transport