config: reduce remote node timeout to 10 update intervals
authorFelix Fietkau <nbd@nbd.name>
Tue, 6 Jul 2021 17:50:02 +0000 (19:50 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 6 Jul 2021 17:50:05 +0000 (19:50 +0200)
Even when there are network issues, we shouldn't keep stale data
around for so long

Signed-off-by: Felix Fietkau <nbd@nbd.name>
main.c
remote.c

diff --git a/main.c b/main.c
index 9e35bf93b3a58fc090c3e481f6be0165339b92a3..8a9bb986cfc90e036c67fa14a6339b134c477841 100644 (file)
--- a/main.c
+++ b/main.c
@@ -89,7 +89,7 @@ void usteer_init_defaults(void)
        config.load_balancing_threshold = 5;
        config.remote_update_interval = 1000;
        config.initial_connect_delay = 0;
-       config.remote_node_timeout = 120 * 1000;
+       config.remote_node_timeout = 10;
 
        config.roam_kick_delay = 100;
        config.roam_scan_tries = 3;
index de183a4b8eb0def9ca278a8f413926de14dde187..26e91ad417ddd72964762666da3b3f3f71cf3d13 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -479,7 +479,7 @@ static void
 usteer_check_timeout(void)
 {
        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) {
                if (node->check++ > timeout)