diff options
author | Dmitry Stogov <dmitry@php.net> | 2009-09-23 10:25:54 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2009-09-23 10:25:54 +0000 |
commit | 4b1c7c56154613c0fcb7c01ee673eb8595d027c2 (patch) | |
tree | 8ba254ab9966cb260ff79a91daeb26b6177e8a5d | |
parent | 6f32199f7523aa31032ef0b90df30b9e2ba3a611 (diff) | |
download | php-git-4b1c7c56154613c0fcb7c01ee673eb8595d027c2.tar.gz |
Fixed ext/standard/tests/streams/stream_get_contents_002.phpt
-rw-r--r-- | main/streams/xp_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index 244d3c37e1..1526422dbc 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -289,7 +289,7 @@ 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 (recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) != SOCK_CONN_ERR && php_socket_errno() != EWOULDBLOCK) { + if (0 >= recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EWOULDBLOCK) { alive = 0; } } |