1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 02:02:32 +01:00

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.
This commit is contained in:
Wez Furlong
2002-03-18 20:13:50 +00:00
parent 16c9da0eed
commit 33906e934a

View File

@@ -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();