mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
fix(examples): Fix usage of SNTP netif API in examples
This commit is contained in:
@ -95,7 +95,7 @@ static void set_time(void)
|
|||||||
if (esp_netif_sntp_sync_wait(pdMS_TO_TICKS(10000)) != ESP_OK) {
|
if (esp_netif_sntp_sync_wait(pdMS_TO_TICKS(10000)) != ESP_OK) {
|
||||||
printf("Failed to update system time, continuing");
|
printf("Failed to update system time, continuing");
|
||||||
}
|
}
|
||||||
esp_netif_deinit();
|
esp_netif_sntp_deinit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void http2_task(void *args)
|
static void http2_task(void *args)
|
||||||
|
@ -83,7 +83,7 @@ esp_err_t fetch_and_store_time_in_nvs(void *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nvs_close(my_handle);
|
nvs_close(my_handle);
|
||||||
esp_netif_deinit();
|
esp_netif_sntp_deinit();
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
|
Reference in New Issue
Block a user