X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fqueuemonitor.php;h=1790a5cd67585f82236ef10f12b587ac91a44542;hb=8a4bec811b07a0ed9d76d0aceb03855c91a67242;hp=3dc0ea65aa55fb3b89984fe89c17d3dbcac969eb;hpb=5c4723919fa757b3e14a59350415cfe53e0900d1;p=quix0rs-gnu-social.git diff --git a/lib/queuemonitor.php b/lib/queuemonitor.php index 3dc0ea65aa..1790a5cd67 100644 --- a/lib/queuemonitor.php +++ b/lib/queuemonitor.php @@ -96,11 +96,16 @@ class QueueMonitor protected function pingHttp($target, $data) { $client = new HTTPClient(); - $result = $client->post($target, array(), $data); + try { + $result = $client->post($target, array(), $data); - if (!$result->isOk()) { - common_log(LOG_ERR, __METHOD__ . ' HTTP ' . $result->getStatus() . - ': ' . $result->getBody()); + if (!$result->isOk()) { + common_log(LOG_ERR, __METHOD__ . ' HTTP ' . $result->getStatus() . ': ' . $result->getBody()); + } + } catch (NoHttpResponseException $e) { + common_log(LOG_ERR, __METHOD__ . ':'.$e->getMessage()); + } catch (HTTP_Request2_Exception $e) { + common_log(LOG_ERR, __CLASS__ . ": Invalid $code redirect from $url to $target"); } }