mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
trigger wifi reconnect by mqtt or ntp failures.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "MQTT.h"
|
||||
#include "mesh/http/WiFiAPClient.h"
|
||||
#include "MeshService.h"
|
||||
#include "NodeDB.h"
|
||||
#include "PowerFSM.h"
|
||||
@@ -164,6 +165,10 @@ void MQTT::reconnect()
|
||||
sendSubscriptions();
|
||||
} else
|
||||
DEBUG_MSG("Failed to contact MQTT server...\n");
|
||||
#if HAS_WIFI
|
||||
WiFi.disconnect(false, true);
|
||||
triggerReconnect();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user