summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/network.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/network.c b/main/network.c
index d9c4c5d33c..d506a31b40 100644
--- a/main/network.c
+++ b/main/network.c
@@ -940,7 +940,7 @@ static size_t php_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS
nr_bytes = recv(sock->socket, buf, count, 0);
- if (nr_bytes == 0 || (nr_bytes < count && php_socket_errno() != EWOULDBLOCK)) {
+ if (nr_bytes == 0 || (nr_bytes == -1 && php_socket_errno() != EWOULDBLOCK)) {
stream->eof = 1;
}
}