remote: always re-schedule update timeout
This commit fixes updates not triggering due to a race-condition in usteer. When usteer does not yet have local-nodes when loading config, the scheduled remote-update is not re-scheduled, leading to usteer only exchanging node-messages on STA-events, leading to expiring remotes on other remote nodes in low-event scenarios. Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
5
remote.c
5
remote.c
@@ -622,17 +622,16 @@ usteer_send_update_timer(struct uloop_timeout *t)
|
|||||||
struct usteer_node *node;
|
struct usteer_node *node;
|
||||||
void *c;
|
void *c;
|
||||||
|
|
||||||
if (avl_is_empty(&local_nodes) && !host_info_blob)
|
|
||||||
return;
|
|
||||||
|
|
||||||
usteer_update_time();
|
usteer_update_time();
|
||||||
uloop_timeout_set(t, config.remote_update_interval);
|
uloop_timeout_set(t, config.remote_update_interval);
|
||||||
|
|
||||||
|
if (!avl_is_empty(&local_nodes) || host_info_blob) {
|
||||||
c = usteer_update_init();
|
c = usteer_update_init();
|
||||||
for_each_local_node(node)
|
for_each_local_node(node)
|
||||||
usteer_send_node(node, NULL);
|
usteer_send_node(node, NULL);
|
||||||
|
|
||||||
usteer_update_send(c);
|
usteer_update_send(c);
|
||||||
|
}
|
||||||
usteer_check_timeout();
|
usteer_check_timeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user