]> granicus.if.org Git - php/commitdiff
MFH: Revert fix for 43782, as it caused problems.
authorDavid Soria Parra <dsp@php.net>
Mon, 24 Nov 2008 15:36:47 +0000 (15:36 +0000)
committerDavid Soria Parra <dsp@php.net>
Mon, 24 Nov 2008 15:36:47 +0000 (15:36 +0000)
main/streams/streams.c
main/streams/xp_socket.c

index a2c956c3af5e20420fe849d614e59f3e75a01585..704e2ccd20b59db9d3c6acd1aeee2b2188e1c1f8 100755 (executable)
@@ -650,7 +650,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 0684d1ae766b6e071a78ceabb8aca32a40aa4b60..a7736878f4fcf838d815a58bfed57034297483e4 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;
                                        }
                                }