mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
* Removes the worker panic when the watcher is enabled. * Only panics on the initial boot. * Only panics on the initial boot. * Resets to always panic when watcher is disabled. --------- Co-authored-by: a.stecher <a.stecher@sportradar.com>
19 lines
298 B
PHP
19 lines
298 B
PHP
<?php
|
|
|
|
$fail = random_int(1, 100) < 10;
|
|
$wait = random_int(1000 * 100, 1000 * 500); // wait 100ms - 500ms
|
|
|
|
usleep($wait);
|
|
if ($fail) {
|
|
exit(1);
|
|
}
|
|
|
|
while (frankenphp_handle_request(function () {
|
|
echo "ok";
|
|
})) {
|
|
$fail = random_int(1, 100) < 10;
|
|
if ($fail) {
|
|
exit(1);
|
|
}
|
|
}
|