projects
/
meshlink
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
338f9b0
)
Reset last_connect_try for all nodes when starting the mesh.
author
Guus Sliepen
<guus@meshlink.io>
Wed, 22 Jul 2020 18:31:59 +0000
(20:31 +0200)
committer
Guus Sliepen
<guus@meshlink.io>
Wed, 22 Jul 2020 18:31:59 +0000
(20:31 +0200)
This helps the autoconnect algorithm reconnect faster if the mesh was
stopped and restarted in quick succession.
src/meshlink.c
patch
|
blob
|
history
diff --git
a/src/meshlink.c
b/src/meshlink.c
index 340b6041cfee81d7f7ef641ec55794dae6c1e5f0..07326d56f0642e644628346cbf5a06779e5c830c 100644
(file)
--- 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