Merge branch 'minor-next' into major-next

This commit is contained in:
Dylan K. Taylor
2024-05-06 15:42:49 +01:00
62 changed files with 2013 additions and 416 deletions

View File

@ -1668,9 +1668,11 @@ class Server{
$this->isRunning = false;
//Force minimum uptime to be >= 120 seconds, to reduce the impact of spammy crash loops
$spacing = ((int) $this->startTime) - time() + 120;
$uptime = time() - ((int) $this->startTime);
$minUptime = 120;
$spacing = $minUptime - $uptime;
if($spacing > 0){
echo "--- Waiting $spacing seconds to throttle automatic restart (you can kill the process safely now) ---" . PHP_EOL;
echo "--- Uptime {$uptime}s - waiting {$spacing}s to throttle automatic restart (you can kill the process safely now) ---" . PHP_EOL;
sleep($spacing);
}
@Process::kill(Process::pid());