Skip to content

Commit c8109b1

Browse files
committed
Sleep 1 sec till server start (PHP 7.4 <)
1 parent d7ff567 commit c8109b1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Http/BuiltinServer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ public function __construct(string $host, string $index)
4040
public function start() : void
4141
{
4242
$this->process->start();
43+
if (version_compare(PHP_VERSION, '7.4.0', '<')) {
44+
sleep(1);
45+
46+
return;
47+
}
4348
$this->process->waitUntil(function (string $type, string $output) : bool {
4449
if ($type === 'err' && ! is_int(strpos($output, 'started'))) {
4550
error_log($output);

0 commit comments

Comments
 (0)