mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-28 04:15:53 +00:00
Fix ESP32 reset during WiFi reconnect when mDNS is active (#24358)
* Fix ESP32 reset during WiFi reconnect when mDNS is active Explicitly call MDNS.end() before WiFi.disconnect() in support_wifi.ino. This prevents a race condition or crash where the mDNS service attempts to query or use the network interface while it is being torn down. * Fix: removed lines added again.
This commit is contained in:
@@ -320,6 +320,10 @@ void WifiBegin(uint8_t flag, uint8_t channel) {
|
||||
#ifdef USE_WIFI_RANGE_EXTENDER
|
||||
if (WiFi.getMode() != WIFI_AP_STA || !RgxApUp()) { // Preserve range extender connections (#17103)
|
||||
#endif // USE_WIFI_RANGE_EXTENDER
|
||||
|
||||
#if defined(ESP32) && defined(USE_DISCOVERY)
|
||||
MDNS.end();
|
||||
#endif
|
||||
WiFi.disconnect(true); // Delete SDK wifi config
|
||||
delay(200);
|
||||
WifiSetMode(WIFI_STA); // Disable AP mode
|
||||
|
||||
Reference in New Issue
Block a user