From 33906e934aecb671e65f0ed91e7712f85d55f6af Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 18 Mar 2002 20:13:50 +0000 Subject: [PATCH] Fix for bug #10001: a timeout event prevents further reads. The Bug DB has a patch that should be applied to fsock.c on the 4.2 branch. --- main/network.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/network.c b/main/network.c index d8a69ebd67..25284a8eb8 100644 --- a/main/network.c +++ b/main/network.c @@ -678,6 +678,7 @@ static size_t php_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS size_t ret = 0; if (sock->is_blocked) { + sock->timeout_event = 0; while(!sock->eof && TOREAD(sock) < count && !sock->timeout_event) php_sock_stream_read_internal(stream, sock TSRMLS_CC); } @@ -791,6 +792,8 @@ static char *php_sockop_gets(php_stream *stream, char *buf, size_t maxlen TSRMLS if(!p) { if(sock->is_blocked) { + sock->timeout_event = 0; + while(!p && !sock->eof && !sock->timeout_event && TOREAD(sock) < maxlen) { php_sock_stream_read_internal(stream, sock TSRMLS_CC); SEARCHCR(); -- 2.40.0