Browse Source

Check for a non-empty response from litelib_execute

pull/125/head
Duke 1 year ago
parent
commit
7364e21f99
  1. 4
      src/firsttimewizard.cpp
  2. 2
      src/mainwindow.cpp

4
src/firsttimewizard.cpp

@ -636,7 +636,7 @@ bool NewSeedPage::validatePage() {
// TODO: this is duplicated code that should be refactored
// into a dedicated function
if (reply.toUpper().trimmed() != "OK") {
if (reply.isEmpty()) {
qDebug() << "Lite server " << parent->server << " is down, getting a random one";
parent->server = Settings::getRandomServer();
qDebug() << __func__ << ": new server is " << parent->server;
@ -771,7 +771,7 @@ bool RestoreSeedPage::validatePage() {
// TODO: this is duplicated code that should be refactored
// into a dedicated function
if (reply.toUpper().trimmed() != "OK") {
if (reply.isEmpty()) {
qDebug() << "Lite server " << parent->server << " is down, getting a random one";
parent->server = Settings::getRandomServer();
qDebug() << __func__ << ": new server is " << parent->server;

2
src/mainwindow.cpp

@ -246,7 +246,7 @@ MainWindow::MainWindow(QWidget *parent) :
qDebug() << __func__ << ": caught an exception, ignoring: " << e.what();
}
if (reply.toUpper().trimmed() != "OK") {
if (reply.isEmpty()) {
qDebug() << "Lite server " << config->server << " is down, getting a random one";
config->server = Settings::getRandomServer();
qDebug() << __func__ << ": new server is " << config->server;

Loading…
Cancel
Save