mqttDisconnect() before 'restart' or 'otaEnd'
This commit is contained in:
parent
be49cd9123
commit
b298f84271
@ -113,6 +113,7 @@ void _reboot() {
|
|||||||
info("Rebooting...");
|
info("Rebooting...");
|
||||||
delay(500);
|
delay(500);
|
||||||
yield();
|
yield();
|
||||||
|
mqttDisconnect();
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -93,6 +93,7 @@ void otaSetup() {
|
|||||||
});
|
});
|
||||||
ArduinoOTA.onEnd([] {
|
ArduinoOTA.onEnd([] {
|
||||||
info("OTA Complete!");
|
info("OTA Complete!");
|
||||||
|
mqttDisconnect();
|
||||||
});
|
});
|
||||||
ArduinoOTA.onError([](ota_error_t e) {
|
ArduinoOTA.onError([](ota_error_t e) {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user