From 7591e21ccce486948224cadcc744c3c329529490 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 12 Jan 2017 10:39:36 +0100 Subject: [PATCH] Support failover API command transport configuration (cherry picked from commit cde55b5764c88111237c8706f743b6eae8938a50) Signed-off-by: Eric Lippmann --- .../library/Monitoring/Command/Transport/CommandTransport.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php b/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php index 512de2f28..aa4754729 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php @@ -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