Retry saved WebConfig WiFi when the MQTT worker is absent

This commit is contained in:
mikecarper committed 2026-10-05 22:10:36 -07:00
1 parent b81da36a00
commit 526a3d1aa4
8 files changed
+479 -31

No files matched your search

+11 -2
View File
@@ -1951,17 +1951,22 @@ bool MyMesh::startWebConfig(bool force_ap, char* reply) {
bool owns_wifi = true;
#ifdef WITH_MQTT_BRIDGE
mqtt_prefs = _cli.getObserverPrefs();
owns_wifi = false;
owns_wifi = !bridge || (!bridge->isRunning() && !bridge->isStopping());
#endif
_webconfig = new WebConfigServer(this, mqtt_prefs, owns_wifi,
self_id.pub_key, getFirmwareVer(), getBuildDate(), getRole(),
_cli.getBoard()->getManufacturerName());
_cli.getBoard()->getManufacturerName(), true);
if (!_webconfig) {
strcpy(reply, "Err: not enough memory for webconfig");
return true;
}
}
#ifdef WITH_MQTT_BRIDGE
_webconfig->updateWiFiOwnership(!bridge
|| (!bridge->isRunning() && !bridge->isStopping()));
#endif
if (force_ap) {
#ifdef WITH_MQTT_BRIDGE
if (bridge && bridge->isRunning()) {
@@ -2742,6 +2747,10 @@ void MyMesh::loop() {
#ifdef WITH_WEBCONFIG
if (_webconfig) {
#ifdef WITH_MQTT_BRIDGE
_webconfig->updateWiFiOwnership(!bridge
|| (!bridge->isRunning() && !bridge->isStopping()));
#endif
_webconfig->tick(millis());
if (!_webconfig->isRunning() && !_webconfig->isStopping()) {
delete _webconfig;