]> granicus.if.org Git - php/commitdiff
Bug #41631: Fix regression from first attempt (6569db8)
authorDaniel Lowrey <rdlowrey@php.net>
Tue, 9 Sep 2014 13:50:15 +0000 (07:50 -0600)
committerDaniel Lowrey <rdlowrey@php.net>
Tue, 9 Sep 2014 15:01:42 +0000 (09:01 -0600)
ext/openssl/xp_ssl.c

index 76095b4df2d73eca39bacc228240b12be0fc2188..b2a939df3d15cace855955190c2aca023e26203f 100644 (file)
@@ -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;