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:
parent
e829221833
commit
7a2e935f53
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user