From e99f1fdc6d12e07324be6e956318496e6a0bfac3 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Mon, 11 Nov 2024 20:00:26 -0300 Subject: [PATCH] fix(wifi): fixes isconnected() to return true when it has ip addr (#10595) --- libraries/WiFi/src/WiFiSTA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/WiFi/src/WiFiSTA.cpp b/libraries/WiFi/src/WiFiSTA.cpp index 1c1ce42c12f..99c02a4b81d 100644 --- a/libraries/WiFi/src/WiFiSTA.cpp +++ b/libraries/WiFi/src/WiFiSTA.cpp @@ -215,7 +215,7 @@ bool WiFiSTAClass::bandwidth(wifi_bandwidth_t bandwidth) { * @return true if STA is connected to an AP */ bool WiFiSTAClass::isConnected() { - return STA.connected(); + return STA.connected() && STA.hasIP(); } /**