Handle esp_tls_conn_read disconnection in ssl_read. Fixes #2805
Closes https://github.com/espressif/esp-idf/pull/2967
This commit is contained in:
parent
41e71c2f53
commit
053219283d
|
@ -130,6 +130,9 @@ static int ssl_read(esp_transport_handle_t t, char *buffer, int len, int timeout
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
|
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
|
||||||
}
|
}
|
||||||
|
if (ret == 0) {
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue