Do not BIO_clear_flags() when the SSL error is not valid to fix #2056

This commit is contained in:
Brad 2014-09-29 23:16:07 -07:00
parent cda93be7dd
commit 0746d8c14c
1 changed files with 2 additions and 1 deletions

View File

@ -168,7 +168,8 @@ static int bio_rdp_tls_read(BIO* bio, char* buf, int size)
case SSL_ERROR_SYSCALL:
error = WSAGetLastError();
if ((error == WSAEWOULDBLOCK) || (error == WSAEINTR) ||
(error == WSAEINPROGRESS) || (error == WSAEALREADY))
(error == WSAEINPROGRESS) || (error == WSAEALREADY) ||
(error == 0))
{
BIO_set_flags(bio, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY));
}