mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/tcp_transport_tls_no_mem_v4.3' into 'release/v4.3'
tcp_transport: Fix error handling of esp_tls_init() (v4.3) See merge request espressif/esp-idf!13676
This commit is contained in:
commit
3e28c250d7
@ -72,6 +72,10 @@ static int ssl_connect(esp_transport_handle_t t, const char *host, int port, int
|
||||
ssl->cfg.timeout_ms = timeout_ms;
|
||||
ssl->ssl_initialized = true;
|
||||
ssl->tls = esp_tls_init();
|
||||
if (ssl->tls == NULL) {
|
||||
ESP_LOGE(TAG, "Failed to initialize new connection object");
|
||||
return -1;
|
||||
}
|
||||
if (esp_tls_conn_new_sync(host, strlen(host), port, &ssl->cfg, ssl->tls) <= 0) {
|
||||
ESP_LOGE(TAG, "Failed to open a new connection");
|
||||
esp_transport_set_errors(t, ssl->tls->error_handle);
|
||||
|
Loading…
Reference in New Issue
Block a user