fix(tcp_transport): fix SSL read blocked when the connecttion is closed

This commit is contained in:
dongheng
2019-06-13 16:56:29 +08:00
parent a227a22a36
commit 8d86f3c36b

View File

@ -129,6 +129,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) {
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
return -1;
}
return ret;
}