From 51fe4d6cde15c1ae6b7c7930bfd4878a174f5ac5 Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 26 Mar 2023 15:09:45 -0700 Subject: [PATCH] Look for non-empty responses instead of the string "OK" Only litelib_initialize_xxx functions return OK to say that the connection worked, others return actual JSON. --- src/connection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/connection.cpp b/src/connection.cpp index 5e8d7b3..13862eb 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -368,7 +368,8 @@ void Executor::run() DEBUG("ignoring exception: " << e.what() ); } - if (response.toUpper().trimmed() != "OK") { + //TODO: we can do stricter error checking + if (response.isEmpty()) { config->server = Settings::getRandomServer(); try {