From 2aeb246874951ec6bf1d16df96052592d0983e16 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 8 Oct 2003 11:22:47 +0000 Subject: [PATCH] Don't forget these EOF flags either... --- main/network.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/main/network.c b/main/network.c index 243851171f..59217e7302 100644 --- a/main/network.c +++ b/main/network.c @@ -1013,9 +1013,7 @@ static size_t php_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS if (nr_bytes <= 0) { retry = handle_ssl_error(stream, nr_bytes TSRMLS_CC); - if (retry == 0 && !SSL_pending(sock->ssl_handle)) { - stream->eof = 1; - } + stream->eof = (retry == 0 && !SSL_pending(sock->ssl_handle)); } else { /* we got the data */ break; @@ -1034,9 +1032,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 == -1 && php_socket_errno() != EWOULDBLOCK)) { - stream->eof = 1; - } + stream->eof = (nr_bytes == 0 || (nr_bytes == -1 && php_socket_errno() != EWOULDBLOCK)); } if (nr_bytes > 0) { -- 2.50.1