]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.c
Don't attempt to sync confbase for ephemeral nodes during a join.
[meshlink] / src / meshlink.c
index 340b6041cfee81d7f7ef641ec55794dae6c1e5f0..0843cc0c4826d0d3a800904f28e4c1c51704c528 100644 (file)
@@ -829,7 +829,7 @@ static bool finalize_join(join_state_t *state, const void *buf, uint16_t len) {
        }
 
        /* Ensure the configuration directory metadata is on disk */
-       if(!config_sync(mesh, "current") || !sync_path(mesh->confbase)) {
+       if(!config_sync(mesh, "current") || (mesh->confbase && !sync_path(mesh->confbase))) {
                return false;
        }
 
@@ -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