]> git.meshlink.io Git - meshlink/commitdiff
Remove redundant call to graph().
authorGuus Sliepen <guus@meshlink.io>
Sun, 18 Aug 2019 14:54:58 +0000 (16:54 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 18 Aug 2019 14:54:58 +0000 (16:54 +0200)
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.

src/protocol_edge.c

index 12ab228f664e033dfa0f6c8480523de5d420c83f..4efb1eceb0bdfbac7723d0050620055253f2b4ff 100644 (file)
@@ -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;