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