Skip to content

Commit cd88b3c

Browse files
authored
Update NetWizard.cpp
Added delay before ESP32 DNS initialization to prevent crashes Added a 100ms delay before checking WiFi AP IP status in the NetWizard loop function. This delay prevents crashes that were occurring when selecting WiFi access points by ensuring the WiFi system has adequate time to initialize before starting the DNS server. Changes: - Added 100ms delay before ESP32 condition check in NetWizard::loop() - Helps prevent race condition between WiFi AP initialization and DNS server setup
1 parent cadd5f5 commit cd88b3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/NetWizard.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ void NetWizard::loop() {
262262
if (_dns != nullptr) {
263263
// Check if DNS server is running
264264
if (!_dns_running) {
265+
delay(100); // Add a small delay here before checking ESP32 condition
265266
#if defined(ESP32)
266267
if (WiFi.AP.hasIP()) {
267268
_dns->start(53, "*", WiFi.AP.localIP());

0 commit comments

Comments
 (0)