Skip to content

Commit 3728449

Browse files
committed
Bug #41631: Fix regression from first attempt (6569db8)
1 parent f86b219 commit 3728449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/openssl/xp_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t coun
249249
to hang forever. To avoid this scenario we poll with a timeout before performing
250250
the actual read. If it times out we're finished.
251251
*/
252-
if (sock->is_blocked) {
252+
if (sock->is_blocked && SSL_pending(sslsock->ssl_handle) == 0) {
253253
php_openssl_stream_wait_for_data(sock);
254254
if (sock->timeout_event) {
255255
stream->eof = 1;

0 commit comments

Comments
 (0)