mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
relayd: iterate safely over monitor_type
This commit is contained in:
parent
6a018eade1
commit
1c1d4e0753
@ -108,10 +108,15 @@ function relayd_configure_do($kill_first = false)
|
||||
} else {
|
||||
$setting = array();
|
||||
}
|
||||
if (isset($config['load_balancer']['monitor_type']) && is_array($config['load_balancer']['monitor_type'])) {
|
||||
$monitors_a = $config['load_balancer']['monitor_type'];
|
||||
} else {
|
||||
$monitors_a = array();
|
||||
}
|
||||
|
||||
$check_a = array();
|
||||
|
||||
foreach ((array)$config['load_balancer']['monitor_type'] as $type) {
|
||||
foreach ($monitors_a as $type) {
|
||||
$type['options'] = isset($type['options']) ? $type['options'] : array();
|
||||
switch($type['type']) {
|
||||
case 'icmp':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user