diff --git a/src/Model/GServer.php b/src/Model/GServer.php index 6a4b14a7b..d38078ea5 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -1050,11 +1050,15 @@ class GServer return $serverdata; } + $retrial = 0; foreach ($contacts as $contact) { - $probed = Contact::getByURL($contact); + $probed = Contact::getByURL($contact, true); if (!empty($probed) && !$probed['failed'] && in_array($probed['network'], Protocol::FEDERATED)) { $serverdata['network'] = $probed['network']; break; + } elseif (++$retrial > 10) { + // To reduce the stress on remote systems we probe a maximum of 10 contacts + break; } }