a lot of thread housekeeping. Switch them off when not needed / disabled.

This commit is contained in:
Thomas Göttgens
2022-12-29 15:45:49 +01:00
parent 1a949b7ca6
commit 41a1dfec79
15 changed files with 102 additions and 59 deletions

View File

@@ -165,11 +165,20 @@ void createSSLCert()
WebServerThread *webServerThread;
WebServerThread::WebServerThread() : concurrency::OSThread("WebServerThread") {}
WebServerThread::WebServerThread() : concurrency::OSThread("WebServerThread") {
if(!config.network.wifi_enabled) {
setInterval(INT32_MAX);
enabled = false;
}
}
int32_t WebServerThread::runOnce()
{
// DEBUG_MSG("WebServerThread::runOnce()\n");
if(!config.network.wifi_enabled) {
setInterval(INT32_MAX);
enabled = false;
}
handleWebResponse();
if (requestRestart && (millis() / 1000) > requestRestart) {