From c9d86e1054b888c2b0223925db531ff9831b01cc Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 22 Jul 2020 20:31:59 +0200 Subject: [PATCH] Reset last_connect_try for all nodes when starting the mesh. This helps the autoconnect algorithm reconnect faster if the mesh was stopped and restarted in quick succession. --- src/meshlink.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/meshlink.c b/src/meshlink.c index 340b6041..07326d56 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1713,6 +1713,11 @@ bool meshlink_start(meshlink_handle_t *mesh) { return false; } + // Reset node connection timers + for splay_each(node_t, n, mesh->nodes) { + n->last_connect_try = 0; + } + // TODO: open listening sockets first //Check that a valid name is set -- 2.39.2