Merge pull request #1625 from bmiklautz/disconnect
tls: handle the case if endpoint has disconnected
This commit is contained in:
commit
5eb0e0c734
@ -382,6 +382,11 @@ int tls_read(rdpTls* tls, BYTE* data, int length)
|
|||||||
|
|
||||||
status = SSL_read(tls->ssl, data, length);
|
status = SSL_read(tls->ssl, data, length);
|
||||||
|
|
||||||
|
if (status == 0)
|
||||||
|
{
|
||||||
|
return -1; /* peer disconnected */
|
||||||
|
}
|
||||||
|
|
||||||
if (status <= 0)
|
if (status <= 0)
|
||||||
{
|
{
|
||||||
error = SSL_get_error(tls->ssl, status);
|
error = SSL_get_error(tls->ssl, status);
|
||||||
|
Loading…
Reference in New Issue
Block a user