AutoDNS load fix in some situations

This commit is contained in:
Henrik Rydgård committed 2025-02-17 16:20:41 -06:00
1 parent fe19283c6e
commit d7ebed2d66
3 files changed
+18 -8

No files matched your search

+7 -1
View File
@@ -112,7 +112,13 @@ int PSPNetconfDialog::Update(int animSpeed) {
std::string json;
if (!jsonReady_ && PollInfraJsonDownload(&json)) {
if (!json.empty()) {
INFO_LOG(Log::sceNet, "Got and processed the json.");
if (!LoadAutoDNS(json)) {
// If the JSON parse fails, throw away the cache file at least.
ERROR_LOG(Log::sceNet, "Failed to parse bad json. Deleting cache file.");
DeleteAutoDNSCacheFile();
} else {
INFO_LOG(Log::sceNet, "Got and processed the AutoDNS json.");
}
} else {
// TODO: Show a notice?
WARN_LOG(Log::sceNet, "Failed to get json file. Autoconfig will not work.");