Browse Source

Added taskYield after wifi start

Sebastien 5 years ago
parent
commit
114d507e3f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      components/wifi-manager/wifi_manager.c

+ 1 - 0
components/wifi-manager/wifi_manager.c

@@ -230,6 +230,7 @@ void wifi_manager_init_wifi(){
     ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_NULL) );
     ESP_LOGD(TAG, "Initializing wifi. Starting wifi");
     ESP_ERROR_CHECK( esp_wifi_start() );
+    taskYIELD();  /* allows the freeRTOS scheduler to take over if needed. */
     ESP_LOGD(TAG, "Initializing wifi. done");
 }