fix latency sort

This commit is contained in:
arm64v8a
2023-03-01 21:44:23 +09:00
parent dd18441b8a
commit 1f4263acd1
3 changed files with 19 additions and 9 deletions

View File

@@ -126,9 +126,13 @@ void MainWindow::speedtest_current_group(int mode) {
}
if (!rpcOK) return;
profile->latency = result.ms();
if (profile->latency == 0) profile->latency = -1; // sn
profile->full_test_report = result.full_report().c_str();
if (result.error().empty()) {
profile->latency = result.ms();
if (profile->latency == 0) profile->latency = 1; // nekoray use 0 to represents not tested
} else {
profile->latency = -1;
}
profile->full_test_report = result.full_report().c_str(); // higher priority
profile->Save();
if (!result.error().empty()) {