diff --git a/examples/protocols/openssl_client/main/openssl_client_example_main.c b/examples/protocols/openssl_client/main/openssl_client_example_main.c index a0e63b8e..ec798df8 100644 --- a/examples/protocols/openssl_client/main/openssl_client_example_main.c +++ b/examples/protocols/openssl_client/main/openssl_client_example_main.c @@ -172,6 +172,9 @@ static void openssl_client_task(void* p) printf("OpenSSL client thread start...\n"); + xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, + false, true, portMAX_DELAY); + ESP_LOGI(TAG, "Connected to AP"); #if CONFIG_SSL_USING_WOLFSSL /* CA date verification need system time */ get_time();