mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 17:49:10 -04:00
tcp_transport: Fix incorrect error logging in ssl_read and ssl_write APIs
Closes https://github.com/espressif/esp-idf/issues/2805
This commit is contained in:
parent
2e3f06ece8
commit
582bf18789
@ -110,7 +110,7 @@ static int ssl_write(esp_transport_handle_t t, const char *buffer, int len, int
|
||||
return poll;
|
||||
}
|
||||
ret = esp_tls_conn_write(ssl->tls, (const unsigned char *) buffer, len);
|
||||
if (ret <= 0) {
|
||||
if (ret < 0) {
|
||||
ESP_LOGE(TAG, "esp_tls_conn_write error, errno=%s", strerror(errno));
|
||||
}
|
||||
return ret;
|
||||
@ -127,7 +127,7 @@ static int ssl_read(esp_transport_handle_t t, char *buffer, int len, int timeout
|
||||
}
|
||||
}
|
||||
ret = esp_tls_conn_read(ssl->tls, (unsigned char *)buffer, len);
|
||||
if (ret <= 0) {
|
||||
if (ret < 0) {
|
||||
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user