From e61a107e8b4dad9832112f1bc2440c7b167e6e6b Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Mon, 24 Nov 2008 15:35:03 +0000 Subject: [PATCH] Revert fix for 43782, as it caused problems. [DOC] We better document the issue at it is. --- main/streams/streams.c | 2 +- main/streams/xp_socket.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/main/streams/streams.c b/main/streams/streams.c index ba2f65c5d3..ec054813da 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -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; } diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index ab304e1f8d..a51c704e63 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; } } -- 2.40.0