X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fgraph.c;h=5afa7c32526509a31b610e8153d26c4c41a87829;hp=d40087d8dc1c65f680c9f55b403f52c3acfc110f;hb=42cef01039177f3c762001439c8fb6bbdcd6e159;hpb=9dd7e301e61ecf3e15aa6611751515d844fa8dae diff --git a/src/graph.c b/src/graph.c index d40087d8..5afa7c32 100644 --- a/src/graph.c +++ b/src/graph.c @@ -165,12 +165,14 @@ static void check_reachability(meshlink_handle_t *mesh) { if(n->status.visited != n->status.reachable) { n->status.reachable = !n->status.reachable; - n->last_state_change = mesh->loop.now.tv_sec; + n->status.dirty = true; if(n->status.reachable) { logger(mesh, MESHLINK_DEBUG, "Node %s became reachable", n->name); + n->last_reachable = mesh->loop.now.tv_sec; } else { logger(mesh, MESHLINK_DEBUG, "Node %s became unreachable", n->name); + n->last_unreachable = mesh->loop.now.tv_sec; } /* TODO: only clear status.validkey if node is unreachable? */