From 4e1e808c25c225f01ec633eb1e598e1e5e848453 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 23 Dec 2019 13:28:44 +0000 Subject: [PATCH] * Merging revisions r43693 from trunk: ------------------------------------------------------------------------ r43693 | michael | 2019-12-15 18:13:08 +0100 (Sun, 15 Dec 2019) | 1 line * Fix bug #36443, patch from Andrew H. Allow non-blocking read ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@43728 - --- packages/openssl/src/opensslsockets.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/openssl/src/opensslsockets.pp b/packages/openssl/src/opensslsockets.pp index 88870a22c5..1484c05dd0 100644 --- a/packages/openssl/src/opensslsockets.pp +++ b/packages/openssl/src/opensslsockets.pp @@ -298,6 +298,8 @@ begin repeat Result:=FSSL.Read(@Buffer ,Count); e:=FSSL.GetError(Result); + if (e=SSL_ERROR_WANT_READ) and (Socket.IOTimeout>0) then + e:=SSL_ERROR_ZERO_RETURN; until Not (e in [SSL_ERROR_WANT_READ,SSL_ERROR_WANT_WRITE]); if (E=SSL_ERROR_ZERO_RETURN) then Result:=0