X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=cbf631f5f211b61ccc545e3676c097a0484689be;hp=a08981f96b64679925defcf16e3bdc41bad15532;hb=35af4051c3749cd2c2137a7eb57171a1fbb12af7;hpb=8c267d3d558ac97a4ce7381a37abb6cc4b46b133 diff --git a/src/net_setup.c b/src/net_setup.c index a08981f9..cbf631f5 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -541,10 +541,17 @@ void close_network_connections(void) { for(node = connection_tree->head; node; node = next) { next = node->next; c = node->data; - c->outgoing = false; + c->outgoing = NULL; terminate_connection(c, false); } + for(list_node_t *node = outgoing_list->head; node; node = node->next) { + outgoing_t *outgoing = node->data; + + if(outgoing->event) + event_del(outgoing->event); + } + list_delete_list(outgoing_list); if(myself && myself->connection) {