Skip to content

Commit 2b7243d

Browse files
committed
WiFi allow status() to be called before begin()
1 parent fdc4356 commit 2b7243d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/SocketWrapper/WiFi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ class WiFiClass: public NetworkInterface
7575
}
7676

7777
int status() {
78+
sta_iface = net_if_get_wifi_sta();
79+
netif = sta_iface;
7880
if (net_mgmt(NET_REQUEST_WIFI_IFACE_STATUS, netif, &sta_state,
7981
sizeof(struct wifi_iface_status))) {
8082
return WL_NO_SHIELD;

0 commit comments

Comments
 (0)