Browse Source

Sleep a little bit more, in some slow machine (like gcov), it will take a little more time to setup server

pull/146/head
Xinchen Hui 14 years ago
parent
commit
36100060b3
  1. 2
      sapi/cli/tests/php_cli_server.inc

2
sapi/cli/tests/php_cli_server.inc

@ -38,7 +38,7 @@ function php_cli_server_start($code = 'echo "Hello world";', $no_router = FALSE)
// note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
// it might not be listening yet...need to wait until fsockopen() call returns
$i = 0;
while (($i++ < 5) && !($fp = @fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT))) {
while (($i++ < 30) && !($fp = @fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT))) {
usleep(10000);
}

Loading…
Cancel
Save