Skip to content

Commit

Permalink
Adding Safer reset method for /wifi/rst path
Browse files Browse the repository at this point in the history
  • Loading branch information
boseji committed Jun 18, 2018
1 parent 059895b commit 4e97638
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PersWiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ void PersWiFiManager::setupWiFiHandlers() {
_server->on("/wifi/rst", [&]() {
_server->send(200, "text/html", "Rebooting...");
delay(100);
ESP.restart();
//ESP.restart();
// Adding Safer Restart method
ESP.wdtDisable();
ESP.reset();
delay(2000);
});

#ifdef WIFI_HTM_PROGMEM
Expand Down

0 comments on commit 4e97638

Please sign in to comment.