Skip to content

Commit 8a2d18f

Browse files
authored
fix(wifi): fixes isconnected() to return true when it has ip addr
1 parent 09a6770 commit 8a2d18f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/WiFi/src/WiFiSTA.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ bool WiFiSTAClass::bandwidth(wifi_bandwidth_t bandwidth) {
215215
* @return true if STA is connected to an AP
216216
*/
217217
bool WiFiSTAClass::isConnected() {
218-
return STA.connected();
218+
return STA.connected() && STA.hasIP();
219219
}
220220

221221
/**

0 commit comments

Comments
 (0)