Merge pull request #1625 from bmiklautz/disconnect

tls: handle the case if endpoint has disconnected
This commit is contained in:
Marc-André Moreau 2013-12-04 08:07:23 -08:00
commit 5eb0e0c734

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);