This commit is contained in:
the-djmaze 2023-02-16 22:30:55 +01:00
parent a9eff27f99
commit 5b536f81e3
2 changed files with 11 additions and 10 deletions

View file

@ -3,16 +3,6 @@ if (defined('APP_VERSION_ROOT_PATH')) {
return;
}
if (function_exists('sys_getloadavg')) {
$load = sys_getloadavg();
if ($load && $load[0] > 95) {
header('HTTP/1.1 503 Service Unavailable');
header('Retry-After: 120');
exit('Mailserver too busy. Please try again later.');
}
unset($load);
}
// PHP 8
if (!function_exists('str_contains')) {
function str_contains(string $haystack, string $needle) : bool