From 77b9d387913c114534e2bb9537db830f49d24f0d Mon Sep 17 00:00:00 2001 From: yuanjm Date: Fri, 26 Jul 2019 11:51:22 +0800 Subject: [PATCH] fix(examples): fix example of openssl client connecting to the server fail When openssl client connect to the server, the wifi not get the ip --- .../openssl_client/main/openssl_client_example_main.c | 3 +++ 1 file changed, 3 insertions(+) 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();