From: Guus Sliepen Date: Sun, 18 Aug 2019 14:54:58 +0000 (+0200) Subject: Remove redundant call to graph(). X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=1b6ec78734eff25d6f7ea3e7e75d83a8905bbbf3 Remove redundant call to graph(). When we receive an ADD_EDGE for an existing edge but with new information, don't call graph() between removing the old edge and adding the new one. This prevents a node from temporarily being considered unreachable, which in turn would cause the SPTPS state to that node being reset. --- diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 12ab228f..4efb1ece 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -201,7 +201,6 @@ bool add_edge_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { logger(mesh, MESHLINK_WARNING, "Got %s from %s which does not match existing entry", "ADD_EDGE", c->name); edge_del(mesh, e); - graph(mesh); } } else { return true;