Update PR

* Incase try block gets triggered, do not enter a spinlock .. sleep for 5 seconds
This commit is contained in:
abraunegg 2025-12-29 08:47:16 +11:00
commit 40a2152d5b
2 changed files with 6 additions and 0 deletions

View file

@ -1331,12 +1331,15 @@ int main(string[] cliArgs) {
} catch (CurlException e) {
// Caught a CurlException
addLogEntry("Network error during main monitor loop: " ~ e.msg ~ " (will retry)");
Thread.sleep(dur!"seconds"(5));
} catch (SocketException e) {
// Caught a SocketException
addLogEntry("Socket error during main monitor loop: " ~ e.msg ~ " (will retry)");
Thread.sleep(dur!"seconds"(5));
} catch (Exception e) {
// Caught some other error
addLogEntry("Unexpected error during main monitor loop: " ~ e.toString());
Thread.sleep(dur!"seconds"(5));
}
// Output end of loop processing times

View file

@ -397,12 +397,15 @@ private:
} catch (CurlException e) {
// Caught a CurlException
addLogEntry("Network error during socketio loop: " ~ e.msg ~ " (will retry)");
Thread.sleep(dur!"seconds"(5));
} catch (SocketException e) {
// Caught a SocketException
addLogEntry("Socket error during socketio loop: " ~ e.msg ~ " (will retry)");
Thread.sleep(dur!"seconds"(5));
} catch (Exception e) {
// Caught some other error
addLogEntry("Unexpected error during socketio loop: " ~ e.toString());
Thread.sleep(dur!"seconds"(5));
}
}
}