1
0
Fork 0

Better handling of timeout issues while probing

This commit is contained in:
Michael 2017-05-31 03:46:43 +00:00
parent e5ff4a8463
commit 609649557b

View file

@ -123,13 +123,13 @@ class Probe {
}
if (!is_object($xrd)) {
logger("No xrd object found for ".$host, LOGGER_DEBUG);
return false;
return array();
}
$links = xml::element_to_array($xrd);
if (!isset($links["xrd"]["link"])) {
logger("No xrd data found for ".$host, LOGGER_DEBUG);
return false;
return array();
}
$xrd_data = array();
@ -222,6 +222,10 @@ class Probe {
$lrdd = self::xrd($uri);
$webfinger = null;
if (is_bool($lrdd)) {
return array();
}
if (!$lrdd) {
$parts = @parse_url($uri);
if (!$parts) {
@ -424,6 +428,10 @@ class Probe {
}
$lrdd = self::xrd($host);
if (is_bool($lrdd)) {
return array();
}
$path_parts = explode("/", trim($parts["path"], "/"));
while (!$lrdd AND (sizeof($path_parts) > 1)) {
@ -462,6 +470,10 @@ class Probe {
}
$lrdd = self::xrd($host);
if (is_bool($lrdd)) {
return array();
}
if (!$lrdd) {
logger('No XRD data was found for '.$uri, LOGGER_DEBUG);
return self::mail($uri, $uid);