From 7e17f64a2d1029d7815231503b6f1558a1b477b2 Mon Sep 17 00:00:00 2001 From: yuanjm Date: Fri, 15 Jan 2021 19:33:52 +0800 Subject: [PATCH] Make OTA example support keepalive --- .../ota/advanced_https_ota/main/advanced_https_ota_example.c | 1 + examples/system/ota/native_ota_example/main/native_ota_example.c | 1 + examples/system/ota/simple_ota_example/main/simple_ota_example.c | 1 + 3 files changed, 3 insertions(+) diff --git a/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c b/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c index 0b9abf1c10..257016f697 100644 --- a/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c +++ b/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c @@ -86,6 +86,7 @@ void advanced_ota_example_task(void *pvParameter) .url = CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL, .cert_pem = (char *)server_cert_pem_start, .timeout_ms = CONFIG_EXAMPLE_OTA_RECV_TIMEOUT, + .keep_alive_enable = true, }; #ifdef CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN diff --git a/examples/system/ota/native_ota_example/main/native_ota_example.c b/examples/system/ota/native_ota_example/main/native_ota_example.c index 6da57f3140..0df3f5f105 100644 --- a/examples/system/ota/native_ota_example/main/native_ota_example.c +++ b/examples/system/ota/native_ota_example/main/native_ota_example.c @@ -97,6 +97,7 @@ static void ota_example_task(void *pvParameter) .url = CONFIG_EXAMPLE_FIRMWARE_UPG_URL, .cert_pem = (char *)server_cert_pem_start, .timeout_ms = CONFIG_EXAMPLE_OTA_RECV_TIMEOUT, + .keep_alive_enable = true, }; #ifdef CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN diff --git a/examples/system/ota/simple_ota_example/main/simple_ota_example.c b/examples/system/ota/simple_ota_example/main/simple_ota_example.c index 5f20140b93..1f73b4d832 100644 --- a/examples/system/ota/simple_ota_example/main/simple_ota_example.c +++ b/examples/system/ota/simple_ota_example/main/simple_ota_example.c @@ -67,6 +67,7 @@ void simple_ota_example_task(void *pvParameter) .url = CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL, .cert_pem = (char *)server_cert_pem_start, .event_handler = _http_event_handler, + .keep_alive_enable = true, }; #ifdef CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN