diff --git a/src/ESPAsync_WiFiManager-Impl.h b/src/ESPAsync_WiFiManager-Impl.h index 5b8fabc5..e7949e95 100644 --- a/src/ESPAsync_WiFiManager-Impl.h +++ b/src/ESPAsync_WiFiManager-Impl.h @@ -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; diff --git a/src_cpp/ESPAsync_WiFiManager.cpp b/src_cpp/ESPAsync_WiFiManager.cpp index c21fc00b..780db7c2 100644 --- a/src_cpp/ESPAsync_WiFiManager.cpp +++ b/src_cpp/ESPAsync_WiFiManager.cpp @@ -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; diff --git a/src_h/ESPAsync_WiFiManager-Impl.h b/src_h/ESPAsync_WiFiManager-Impl.h index 5b8fabc5..e7949e95 100644 --- a/src_h/ESPAsync_WiFiManager-Impl.h +++ b/src_h/ESPAsync_WiFiManager-Impl.h @@ -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;