X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=f07bdda4992395dbae37c4a983b2417483e69395;hb=e05371346548dee977d4ee45e12e3058e749afb6;hp=1c9a952d7bea3f1979c507aa477af19d20c7096f;hpb=dd1b69e31f83e2cc200ecc10e6d927373823332b;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index 1c9a952d..f07bdda4 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -586,7 +586,7 @@ static bool setup_myself(void) { free(fname); if(!get_config_string(lookup_config(config_tree, "Port"), &myport)) - abort(); //myport = xstrdup("655"); + myport = xstrdup("655"); xasprintf(&myself->hostname, "MYSELF port %s", myport); myself->connection->hostname = xstrdup(myself->hostname); @@ -963,6 +963,9 @@ void close_network_connections(void) { for(node = connection_tree->head; node; node = next) { next = node->next; c = node->data; + /* Keep control connections open until the end, so they know when we really terminated */ + if(c->status.control) + c->socket = -1; c->outgoing = NULL; terminate_connection(c, false); }