mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +02:00
fix(tcp_transport): Silence recoverable read failures
In some applications, ESP_TLS_ERR_SSL_WANT_READ and ESP_TLS_ERR_SSL_TIMEOUT are common results which need handled at the next layer. Downgrade these to debug.
This commit is contained in:
@ -269,9 +269,12 @@ static int ssl_read(esp_transport_handle_t t, char *buffer, int len, int timeout
|
||||
|
||||
int ret = esp_tls_conn_read(ssl->tls, (unsigned char *)buffer, len);
|
||||
if (ret < 0) {
|
||||
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
|
||||
if (ret == ESP_TLS_ERR_SSL_WANT_READ || ret == ESP_TLS_ERR_SSL_TIMEOUT) {
|
||||
ret = ERR_TCP_TRANSPORT_CONNECTION_TIMEOUT;
|
||||
ESP_LOGD(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
|
||||
}
|
||||
else {
|
||||
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
|
||||
}
|
||||
|
||||
esp_tls_error_handle_t esp_tls_error_handle;
|
||||
|
Reference in New Issue
Block a user