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: https://git.meshlink.io/?a=commitdiff_plain;h=c9d86e1054b888c2b0223925db531ff9831b01cc;p=meshlink 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