]> granicus.if.org Git - php/commitdiff
Revert fix for 43782, as it caused problems.
authorDavid Soria Parra <dsp@php.net>
Mon, 24 Nov 2008 15:35:03 +0000 (15:35 +0000)
committerDavid Soria Parra <dsp@php.net>
Mon, 24 Nov 2008 15:35:03 +0000 (15:35 +0000)
[DOC] We better document the issue at it is.

main/streams/streams.c
main/streams/xp_socket.c

index ba2f65c5d3476f41a975feee04e4f518616d1f8f..ec054813daa7e8bf56aec2966957692b598def62 100755 (executable)
@@ -840,7 +840,7 @@ PHPAPI int _php_stream_eof(php_stream *stream TSRMLS_DC)
        /* use the configured timeout when checking eof */
        if (!stream->eof && PHP_STREAM_OPTION_RETURN_ERR ==
                        php_stream_set_option(stream, PHP_STREAM_OPTION_CHECK_LIVENESS,
-                       -1, NULL)) {
+                       0, NULL)) {
                stream->eof = 1;
        }
 
index ab304e1f8df5669aaba80f3e2fff1fc68703c8a0..a51c704e6360b0873012f034a4db78a3530fdde0 100644 (file)
@@ -280,12 +280,8 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void
 
                                if (sock->socket == -1) {
                                        alive = 0;
-                               } else {
-                                       if (php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
-                                               if (0 == recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGAIN) {
-                                                       alive = 0;
-                                               }
-                                       } else {
+                               } else if (php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
+                                       if (0 == recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGAIN) {
                                                alive = 0;
                                        }
                                }