From: Guus Sliepen Date: Wed, 22 Jul 2020 18:31:59 +0000 (+0200) Subject: Reset last_connect_try for all nodes when starting the mesh. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=c9d86e1054b888c2b0223925db531ff9831b01cc 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. --- 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