From 366f6e24bce526acca24c5a2594bfbfe67e5ca9b Mon Sep 17 00:00:00 2001 From: lucretius Date: Sun, 21 Jan 2024 13:17:00 +0100 Subject: [PATCH] fix for getRandomServer() --- src/settings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/settings.cpp b/src/settings.cpp index f68965a..f8cbaa1 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -342,8 +342,10 @@ QString Settings::getRandomServer() { qDebug() << __func__ << ": caught an exception, ignoring: " << e.what(); } - // if we see a valid connection, return this server - if (response.toUpper().trimmed() == "OK") { + // if we see a valid connection, return this server. when the server is alive, + //it tries to read the wallet. This causes an error because it cannot find it (SDL only has a non-encrypted wallet.dat during storage processes) + // We can use that. + if (response.contains("Error: Cannot read wallet.")) { qDebug() << "Choosing lite server " << server; return server; }