From 2e8d607b2130c0081e41f38ad36556b79b675612 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 25 Jun 2020 18:08:58 +1000 Subject: [PATCH] legacy provisioning: Always try to reconnect when disconnected Some APs may fail authentication temporarily if they have too many associated stations, for example. --- examples/provisioning/legacy/ble_prov/main/app_prov.c | 2 +- examples/provisioning/legacy/console_prov/main/app_prov.c | 2 +- examples/provisioning/legacy/custom_config/main/app_prov.c | 2 +- examples/provisioning/legacy/softap_prov/main/app_prov.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/provisioning/legacy/ble_prov/main/app_prov.c b/examples/provisioning/legacy/ble_prov/main/app_prov.c index 19ea1b311e..7ce62346fa 100644 --- a/examples/provisioning/legacy/ble_prov/main/app_prov.c +++ b/examples/provisioning/legacy/ble_prov/main/app_prov.c @@ -248,8 +248,8 @@ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_bas /* If none of the expected reasons, * retry connecting to host SSID */ g_prov->wifi_state = WIFI_PROV_STA_CONNECTING; - esp_wifi_connect(); } + esp_wifi_connect(); } } diff --git a/examples/provisioning/legacy/console_prov/main/app_prov.c b/examples/provisioning/legacy/console_prov/main/app_prov.c index b260db5f42..c02e482803 100644 --- a/examples/provisioning/legacy/console_prov/main/app_prov.c +++ b/examples/provisioning/legacy/console_prov/main/app_prov.c @@ -186,8 +186,8 @@ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_bas /* If none of the expected reasons, * retry connecting to host SSID */ g_prov->wifi_state = WIFI_PROV_STA_CONNECTING; - esp_wifi_connect(); } + esp_wifi_connect(); } } diff --git a/examples/provisioning/legacy/custom_config/main/app_prov.c b/examples/provisioning/legacy/custom_config/main/app_prov.c index d9859cdb4a..16e893a999 100644 --- a/examples/provisioning/legacy/custom_config/main/app_prov.c +++ b/examples/provisioning/legacy/custom_config/main/app_prov.c @@ -211,8 +211,8 @@ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_bas /* If none of the expected reasons, * retry connecting to host SSID */ g_prov->wifi_state = WIFI_PROV_STA_CONNECTING; - esp_wifi_connect(); } + esp_wifi_connect(); } } diff --git a/examples/provisioning/legacy/softap_prov/main/app_prov.c b/examples/provisioning/legacy/softap_prov/main/app_prov.c index 73c8bdfc62..11e7988540 100644 --- a/examples/provisioning/legacy/softap_prov/main/app_prov.c +++ b/examples/provisioning/legacy/softap_prov/main/app_prov.c @@ -197,8 +197,8 @@ static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_bas /* If none of the expected reasons, * retry connecting to host SSID */ g_prov->wifi_state = WIFI_PROV_STA_CONNECTING; - esp_wifi_connect(); } + esp_wifi_connect(); } }