mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix pipe peek timeout
This commit is contained in:
parent
58b982afed
commit
6f3dd4d45b
1 changed files with 3 additions and 3 deletions
|
@ -378,11 +378,11 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count)
|
||||||
if (!PeekNamedPipe(ph, NULL, 0, NULL, &avail_read, NULL)) {
|
if (!PeekNamedPipe(ph, NULL, 0, NULL, &avail_read, NULL)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* If there's nothing to read, wait in 100ms periods. */
|
/* If there's nothing to read, wait in 10ms periods. */
|
||||||
if (0 == avail_read) {
|
if (0 == avail_read) {
|
||||||
usleep(100000);
|
usleep(10);
|
||||||
}
|
}
|
||||||
} while (0 == avail_read && retry++ < 320);
|
} while (0 == avail_read && retry++ < 3200000);
|
||||||
|
|
||||||
/* Reduce the required data amount to what is available, otherwise read()
|
/* Reduce the required data amount to what is available, otherwise read()
|
||||||
will block.*/
|
will block.*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue