X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;ds=inline;f=src%2Fnet.c;h=863dd762c326c885312a88d703f157f2ae4fc0ed;hb=e72e6febfeddbd4354560388c8e0e125a8017909;hp=58db16e29f1d26778a6a649adcea0af1f49b448f;hpb=7a6ca7a993e5907497d97fef09e375698dde182f;p=tinc diff --git a/src/net.c b/src/net.c index 58db16e2..863dd762 100644 --- a/src/net.c +++ b/src/net.c @@ -145,8 +145,10 @@ void terminate_connection(connection_t *c, bool report) { /* Check if this was our outgoing connection */ if(c->outgoing) { - do_outgoing_connection(c); - } + do_outgoing_connection(c); + } else { + connection_del(c); + } } /* @@ -339,9 +341,10 @@ int reload_configuration(void) { void retry(void) { connection_t *c; - splay_node_t *node; + splay_node_t *node, *next; - for(node = connection_tree->head; node; node = node->next) { + for(node = connection_tree->head; node; node = next) { + next = node->next; c = node->data; if(c->outgoing && !c->node) {