From: David Soria Parra Date: Mon, 24 Nov 2008 15:36:47 +0000 (+0000) Subject: MFH: Revert fix for 43782, as it caused problems. X-Git-Tag: php-5.3.0alpha2~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9282f72a87df3f6a87084ee6c7c9ed92decea76;p=php MFH: Revert fix for 43782, as it caused problems. --- diff --git a/main/streams/streams.c b/main/streams/streams.c index a2c956c3af..704e2ccd20 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -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; } diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index 0684d1ae76..a7736878f4 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -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; } }