diff options
author | Wez Furlong <wez@php.net> | 2003-10-08 10:55:51 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2003-10-08 10:55:51 +0000 |
commit | 590b3ccc79496e746c7aab8a62c2ccbb4ba8ceb2 (patch) | |
tree | d5bace4145dfd7f5cad2514b5f63206285fcc096 /main/streams/xp_socket.c | |
parent | e85a4cdbd20384d707c4e2afdfe48f1ca0896b59 (diff) | |
download | php-git-590b3ccc79496e746c7aab8a62c2ccbb4ba8ceb2.tar.gz |
Set the EOF indicator after each read attempt.
This prevents it getting stuck in the on position.
Diffstat (limited to 'main/streams/xp_socket.c')
-rw-r--r-- | main/streams/xp_socket.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index 1663a85ffa..193958fa6e 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -124,9 +124,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) { php_stream_notify_progress_increment(stream->context, nr_bytes, 0); |