1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-06 05:21:22 +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 {
bResult = ((WiFi.isConnected()) && // Has connection?
(_updateProbeStatus()) && // Probing
(_checkServiceQueryCache())); // Service query cache check
bResult = ((WiFi.isConnected() || // Either station is connected
WiFi.softAPgetStationNum()>0) && // Or AP has stations connected
(_updateProbeStatus()) && // Probing
(_checkServiceQueryCache())); // Service query cache check
}
return bResult;
}