fix: call configTime() in minimal WiFi path to initialize DNS resolver
Without configTime(), the ESP32 DNS subsystem isn't properly initialized after WiFi connect, causing HTTPS hostname resolution to fail silently in the deep sleep wake path. The fix calls configTime() fire-and-forget (non-blocking, <1ms) which initializes DNS without the 5-second NTP wait. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -62,8 +62,10 @@ void WiFiManager::startStation(bool minimal) {
|
||||
WiFi.localIP().toString().c_str(), WiFi.RSSI());
|
||||
|
||||
if (minimal) {
|
||||
// Deep sleep wake path: skip NTP/mDNS to minimize active time.
|
||||
// System clock was already seeded from hardware RTC at boot.
|
||||
// Deep sleep wake path: skip blocking NTP wait and mDNS to
|
||||
// minimize active time. Still call configTime() to initialize
|
||||
// the DNS resolver (required for HTTPS hostname resolution).
|
||||
configTime(0, 0, "pool.ntp.org", "time.nist.gov");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user