From dcfc8c174d98aec63e1ca0eb134d1c12fd9b1dae Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 13 Feb 2015 10:06:09 +0100 Subject: [PATCH] Check etherpad API is reachable and log an error if it isn't --- vroom.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vroom.pl b/vroom.pl index 4ce94bf..3e34013 100755 --- a/vroom.pl +++ b/vroom.pl @@ -63,6 +63,10 @@ if ($config->{'etherpad.uri'} =~ m/https?:\/\/.*/ && $config->{'etherpad.api_key url => $config->{'etherpad.uri'}, apikey => $config->{'etherpad.api_key'} }); + if (!$ec->check_token){ + app->log->info("Can't connect to Etherpad-Lite API, check your API key and uri"); + $ec = undef; + } } # Load I18N, and declare supported languages