From 0746d8c14cc8cca7b66bdea31fa6a00cbd509095 Mon Sep 17 00:00:00 2001 From: Brad Date: Mon, 29 Sep 2014 23:16:07 -0700 Subject: [PATCH] Do not BIO_clear_flags() when the SSL error is not valid to fix #2056 --- libfreerdp/crypto/tls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index 24878d2..1b9d165 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -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)); } -- 2.7.4