We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd0c1a3 commit b619a75Copy full SHA for b619a75
1 file changed
modules/io/wifi/esp32/wifi-esp32.c
@@ -183,6 +183,13 @@ void xs_wifi419_close(xsMachine *the)
183
184
static void initWiFi(void)
185
{
186
+ wifi_mode_t mode;
187
+ if (ESP_OK == esp_wifi_get_mode(&mode)) {
188
+ if (!gStation)
189
+ gStation = esp_netif_get_handle_from_ifkey("WIFI_STA_DEF");
190
+ return;
191
+ }
192
+
193
if (gStation) return;
194
195
esp_netif_init();
0 commit comments