tls: handle the case if endpoint has disconnected

This commit is contained in:
Bernhard Miklautz 2013-12-04 15:36:25 +01:00
parent 2b6b4a6685
commit 6763e059c3

View File

@ -382,6 +382,11 @@ int tls_read(rdpTls* tls, BYTE* data, int length)
status = SSL_read(tls->ssl, data, length);
if (status == 0)
{
return -1; /* peer disconnected */
}
if (status <= 0)
{
error = SSL_get_error(tls->ssl, status);