Skip to content

Commit 5f7966a

Browse files
committed
WiFi: wait for event NET_EVENT_WIFI_CONNECT_RESULT in blocking mode
1 parent 0e33da2 commit 5f7966a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/SocketWrapper/WiFi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class WiFiClass : public NetworkInterface {
3939

4040
NetworkInterface::begin(false, NET_EVENT_WIFI_MASK);
4141
if (blocking) {
42-
net_mgmt_event_wait_on_iface(sta_iface, NET_EVENT_WIFI_AP_STA_CONNECTED, NULL, NULL,
43-
NULL, K_FOREVER);
42+
net_mgmt_event_wait_on_iface(sta_iface, NET_EVENT_WIFI_CONNECT_RESULT, NULL, NULL, NULL,
43+
K_FOREVER);
4444
}
4545

4646
return true;

0 commit comments

Comments
 (0)