fix negative frankenphp_ready_workers metrics (#1491)

This commit is contained in:
Indra Gunawan
2025-05-01 08:05:23 +08:00
committed by GitHub
parent 6f1b4f3bae
commit a6e1d3554d
3 changed files with 118 additions and 0 deletions

13
testdata/worker-restart.php vendored Normal file
View File

@@ -0,0 +1,13 @@
<?php
$fn = static function () {
echo sprintf("Counter (%s)", $_GET['i'] ?? 'i not set');
};
$loopMax = $_SERVER['EVERY'] ?? 10;
$loops = 0;
do {
$ret = \frankenphp_handle_request($fn);
} while ($ret && (-1 === $loopMax || ++$loops < $loopMax));
exit(0);