Skip to content

Commit

Permalink
fix pipe peek timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Jul 2, 2015
1 parent 58b982a commit 6f3dd4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main/streams/plain_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
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) {
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()
will block.*/
Expand Down

0 comments on commit 6f3dd4d

Please sign in to comment.