]> git.mxchange.org Git - friendica.git/commitdiff
A server is only reachable when the network can be detected
authorMichael <heluecht@pirati.ca>
Fri, 23 Dec 2022 06:48:53 +0000 (06:48 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 23 Dec 2022 06:48:53 +0000 (06:48 +0000)
src/Model/GServer.php

index 2fc37f35c36396b7e9fbe5601f3df42e0e8a4f24..b0a9dd5c9a590210d233d2161932df2f6239e2f8 100644 (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'];
                }