We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebd832c commit e92f4e6Copy full SHA for e92f4e6
libraries/WebServer/src/WebServer.cpp
@@ -806,10 +806,10 @@ String WebServer::_responseCodeToString(int code) {
806
807
#if SOC_WIFI_SUPPORTED
808
bool ON_STA_FILTER(WebServer &server) {
809
- return WiFi.STA.localIP() == server.client().localIP();
+ return WiFi.STA.hasIP() && WiFi.STA.localIP() == server.client().localIP();
810
}
811
812
bool ON_AP_FILTER(WebServer &server) {
813
- return WiFi.AP.localIP() == server.client().localIP();
+ return WiFi.AP.hasIP() && WiFi.AP.localIP() == server.client().localIP();
814
815
#endif
0 commit comments