X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet.c;h=8bec6b67f52af5e52c671d94cc26ffad425244aa;hb=HEAD;hp=99c29c943290b1ea7636b7b01dd9ed072a965665;hpb=bf97beee4bbea1b07eb6dafc2b9eb08d9d17a294;p=meshlink diff --git a/src/net.c b/src/net.c index 99c29c94..35cfc650 100644 --- a/src/net.c +++ b/src/net.c @@ -52,7 +52,9 @@ static const int default_interval = 60; - Check if we need to retry making an outgoing connection */ void terminate_connection(meshlink_handle_t *mesh, connection_t *c, bool report) { - logger(mesh, MESHLINK_INFO, "Closing connection with %s", c->name); + if(c->status.active) { + logger(mesh, MESHLINK_INFO, "Closing connection with %s", c->name); + } if(c->node && c->node->connection == c) { if(c->status.active && mesh->meta_status_cb) { @@ -620,11 +622,9 @@ static void periodic_handler(event_loop_t *loop, void *data) { for splay_each(node_t, n, mesh->nodes) { if(n->status.dirty) { - if(!node_write_config(mesh, n)) { + if(!node_write_config(mesh, n, false)) { logger(mesh, MESHLINK_DEBUG, "Could not update %s", n->name); } - - n->status.dirty = false; } if(n->status.reachable && n->status.validkey && n->last_req_key + 3600 < mesh->loop.now.tv_sec) {