SMF Development > Bug Reports
Load balancing does not work with a load of zero.
(1/1)
Woet:
When the load on the server is zero, the load balancing option outputs "Load balancing support is disabled by your host configuration."
The relevant piece of code in Sources/ManageServer.php is the following:
--- Code: --- if (!empty($modSettings['load_average']))
{
$context['settings_message'] = sprintf($txt['loadavg_warning'], $modSettings['load_average']);
$disabled = false;
}
--- End code ---
I recommend adding "|| $modSettings['load_average'] === 0.0" so it works with load averages of zero too.
--- Code: --- if (!empty($modSettings['load_average']) || $modSettings['load_average'] === 0.0)
{
$context['settings_message'] = sprintf($txt['loadavg_warning'], $modSettings['load_average']);
$disabled = false;
}
--- End code ---
emanuele:
Hello Woet and welcome to sm.org.
Thanks for the report and the fix! :)
Navigation
[0] Message Index
Go to full version