Fixed broken http2_request example.

Implementation of `esp_tls_conn_new_sync` now uses timeout_ms value to
give up retries.

Specified this value to be 10 sec. (10 * 1000 ms).

Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
release/v4.0
Vikram Dattu 2020-03-17 12:45:19 +05:30 zatwierdzone przez Harshit Malpani
rodzic ce82d1b9fa
commit b0e119640d
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -242,7 +242,8 @@ int sh2lib_connect(struct sh2lib_handle *hd, const char *uri)
esp_tls_cfg_t tls_cfg = {
.alpn_protos = proto,
.non_block = true,
};
.timeout_ms = 10 * 1000,
};
if ((hd->http2_tls = esp_tls_conn_http_new(uri, &tls_cfg)) == NULL) {
ESP_LOGE(TAG, "[sh2-connect] esp-tls connection failed");
goto error;