config: reduce remote node timeout to 10 update intervals

Even when there are network issues, we shouldn't keep stale data
around for so long

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2021-07-06 19:50:02 +02:00
parent e685db7fa7
commit 07a2f767e5
2 changed files with 2 additions and 2 deletions

2
main.c
View File

@@ -89,7 +89,7 @@ void usteer_init_defaults(void)
config.load_balancing_threshold = 5; config.load_balancing_threshold = 5;
config.remote_update_interval = 1000; config.remote_update_interval = 1000;
config.initial_connect_delay = 0; config.initial_connect_delay = 0;
config.remote_node_timeout = 120 * 1000; config.remote_node_timeout = 10;
config.roam_kick_delay = 100; config.roam_kick_delay = 100;
config.roam_scan_tries = 3; config.roam_scan_tries = 3;

View File

@@ -479,7 +479,7 @@ static void
usteer_check_timeout(void) usteer_check_timeout(void)
{ {
struct usteer_remote_node *node, *tmp; struct usteer_remote_node *node, *tmp;
int timeout = config.remote_node_timeout / config.remote_update_interval; int timeout = config.remote_node_timeout;
list_for_each_entry_safe(node, tmp, &remote_nodes, list) { list_for_each_entry_safe(node, tmp, &remote_nodes, list) {
if (node->check++ > timeout) if (node->check++ > timeout)