Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #49 from mattbradford83/master
Browse files Browse the repository at this point in the history
Allow captive portal to run more than once by closing dnsServer cleanly.
  • Loading branch information
khoih-prog committed Apr 13, 2021
2 parents 88571d9 + eb22ade commit fee3a98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ESPAsync_WiFiManager-Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *ap

#if !( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
server->reset();
*dnsServer = DNSServer();
dnsServer->stop();
#endif

return WiFi.status() == WL_CONNECTED;
Expand Down
2 changes: 1 addition & 1 deletion src_cpp/ESPAsync_WiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *ap

#if !( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
server->reset();
*dnsServer = DNSServer();
dnsServer->stop();
#endif

return WiFi.status() == WL_CONNECTED;
Expand Down
2 changes: 1 addition & 1 deletion src_h/ESPAsync_WiFiManager-Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *ap

#if !( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_PROS2 || ARDUINO_MICROS2 )
server->reset();
*dnsServer = DNSServer();
dnsServer->stop();
#endif

return WiFi.status() == WL_CONNECTED;
Expand Down

0 comments on commit fee3a98

Please sign in to comment.