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:
rustyx 2019-01-19 11:13:22 +01:00 committed by Mahavir Jain
parent 41e71c2f53
commit 053219283d
1 changed files with 3 additions and 0 deletions

View File

@ -130,6 +130,9 @@ static int ssl_read(esp_transport_handle_t t, char *buffer, int len, int timeout
if (ret < 0) {
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
}
if (ret == 0) {
ret = -1;
}
return ret;
}