1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-07 16:23:38 +03:00

Fix OTA in AP mode (#5894)

OTA is broken in AP mode because ESP8266mDNS is checking whether the station is connected before processing. Change the logic to WiFi.isConnected() OR WiFi.softAPgetStationNum()>0 fixes the issue.
This commit is contained in:
Zachary Drew 2019-03-21 12:05:16 -07:00 committed by Earle F. Philhower, III
parent e829221833
commit 7a2e935f53

View File

@ -78,9 +78,10 @@ bool MDNSResponder::_process(bool p_bUserContext) {
} }
} }
else { else {
bResult = ((WiFi.isConnected()) && // Has connection? bResult = ((WiFi.isConnected() || // Either station is connected
(_updateProbeStatus()) && // Probing WiFi.softAPgetStationNum()>0) && // Or AP has stations connected
(_checkServiceQueryCache())); // Service query cache check (_updateProbeStatus()) && // Probing
(_checkServiceQueryCache())); // Service query cache check
} }
return bResult; return bResult;
} }