Skip to content

Commit 061c05c

Browse files
Merge branch 'contrib/github_pr_15967' into 'master'
fix(tcp_transport): Silence recoverable read failures (GitHub PR) Closes IDFGH-15309 See merge request espressif/esp-idf!39259
2 parents 30f9814 + 7f982fa commit 061c05c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/tcp_transport/transport_ssl.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,12 @@ static int ssl_read(esp_transport_handle_t t, char *buffer, int len, int timeout
272272

273273
int ret = esp_tls_conn_read(ssl->tls, (unsigned char *)buffer, len);
274274
if (ret < 0) {
275-
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
276275
if (ret == ESP_TLS_ERR_SSL_WANT_READ || ret == ESP_TLS_ERR_SSL_TIMEOUT) {
277276
ret = ERR_TCP_TRANSPORT_CONNECTION_TIMEOUT;
277+
ESP_LOGD(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
278+
}
279+
else {
280+
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
278281
}
279282

280283
esp_tls_error_handle_t esp_tls_error_handle;

0 commit comments

Comments
 (0)