Support failover API command transport configuration

(cherry picked from commit cde55b5764)

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
Eric Lippmann 2017-01-12 10:39:36 +01:00
parent 0ae33991bf
commit 7591e21ccc
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