Enforce probing
This commit is contained in:
parent
f1cac5170b
commit
85f029a724
1 changed files with 5 additions and 1 deletions
|
@ -1050,11 +1050,15 @@ class GServer
|
||||||
return $serverdata;
|
return $serverdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$retrial = 0;
|
||||||
foreach ($contacts as $contact) {
|
foreach ($contacts as $contact) {
|
||||||
$probed = Contact::getByURL($contact);
|
$probed = Contact::getByURL($contact, true);
|
||||||
if (!empty($probed) && !$probed['failed'] && in_array($probed['network'], Protocol::FEDERATED)) {
|
if (!empty($probed) && !$probed['failed'] && in_array($probed['network'], Protocol::FEDERATED)) {
|
||||||
$serverdata['network'] = $probed['network'];
|
$serverdata['network'] = $probed['network'];
|
||||||
break;
|
break;
|
||||||
|
} elseif (++$retrial > 10) {
|
||||||
|
// To reduce the stress on remote systems we probe a maximum of 10 contacts
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue