From 372844918a318ad712e16f9ec636682424a65403 Mon Sep 17 00:00:00 2001 From: Daniel Lowrey Date: Tue, 9 Sep 2014 07:50:15 -0600 Subject: Bug #41631: Fix regression from first attempt (6569db8) --- ext/openssl/xp_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 76095b4df2..b2a939df3d 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -249,7 +249,7 @@ static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t coun to hang forever. To avoid this scenario we poll with a timeout before performing the actual read. If it times out we're finished. */ - if (sock->is_blocked) { + if (sock->is_blocked && SSL_pending(sslsock->ssl_handle) == 0) { php_openssl_stream_wait_for_data(sock); if (sock->timeout_event) { stream->eof = 1; -- cgit v1.2.1