From 7a2e935f538c97cf0c3ea606bda117a088011e90 Mon Sep 17 00:00:00 2001 From: Zachary Drew <40512651+zacharydrew@users.noreply.github.com> Date: Thu, 21 Mar 2019 12:05:16 -0700 Subject: [PATCH] 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. --- libraries/ESP8266mDNS/src/LEAmDNS_Control.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/ESP8266mDNS/src/LEAmDNS_Control.cpp b/libraries/ESP8266mDNS/src/LEAmDNS_Control.cpp index 9bb4636ee..449361d32 100644 --- a/libraries/ESP8266mDNS/src/LEAmDNS_Control.cpp +++ b/libraries/ESP8266mDNS/src/LEAmDNS_Control.cpp @@ -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; }