Skip to content

Commit 6f3dd4d

Browse files
committed
fix pipe peek timeout
1 parent 58b982a commit 6f3dd4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/streams/plain_wrapper.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,11 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count)
378378
if (!PeekNamedPipe(ph, NULL, 0, NULL, &avail_read, NULL)) {
379379
break;
380380
}
381-
/* If there's nothing to read, wait in 100ms periods. */
381+
/* If there's nothing to read, wait in 10ms periods. */
382382
if (0 == avail_read) {
383-
usleep(100000);
383+
usleep(10);
384384
}
385-
} while (0 == avail_read && retry++ < 320);
385+
} while (0 == avail_read && retry++ < 3200000);
386386

387387
/* Reduce the required data amount to what is available, otherwise read()
388388
will block.*/

0 commit comments

Comments
 (0)