Merge pull request #12512 from annando/available

A server is only reachable when the network can be detected
This commit is contained in:
Philipp 2022-12-23 08:28:34 +01:00 committed by GitHub
commit e5e4d142ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,11 +191,11 @@ class GServer
$condition = ['nurl' => Strings::normaliseLink($server)];
}
$gserver = DBA::selectFirst('gserver', ['url', 'next_contact', 'failed'], $condition);
$gserver = DBA::selectFirst('gserver', ['url', 'next_contact', 'failed', 'network'], $condition);
if (empty($gserver)) {
$reachable = true;
} else {
$reachable = !$gserver['failed'];
$reachable = !$gserver['failed'] && in_array($gserver['network'], Protocol::FEDERATED);
$server = $gserver['url'];
}