librespeed / speedtest-android

Android app template for Librespeed servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check if speedtest backends are available

Perflyst opened this issue · comments

Currently the app does not check if the backends are working. The web-version does that, would be nice if the android app would do that too.

The servers are removed from the combobox if the initial ping fails. If you're having trouble with that, give me your server list json file so I can test it.

The server itself and the backend on / is reachable, though the speedtest files are not available. Web version detects this correctly.

For example

[
  {
    "name": "(1) France, Paris (online.net)",
    "server": "//fr1.backend.librespeed.org/",
    "dlURL": "garbage.php",
    "ulURL": "empty.php",
    "pingURL": "empty.php",
    "getIpURL": "getIP.php"
  }
]

Ah yes, I see the problem now. The web version downloads empty.php when checking if a server is available, but the android version just sends the request and waits for any kind of response from the server, which is ignored, and a server is considered to be down only if we get no response or fail to connect.
This was done for simplicity, because it's almost as accurate as an actual ping, something that can't be said for the web version.
If you want to change this behavior, you can read the response here instead of simply discarding it: