From 817720bfdcc4276372594089dcdb9d8a56e92364 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 24 Jan 2019 19:49:12 +0100 Subject: fix #5491 --- src/cadet/gnunet-service-cadet.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c index 4f9fda82b..ae5d48943 100644 --- a/src/cadet/gnunet-service-cadet.c +++ b/src/cadet/gnunet-service-cadet.c @@ -380,6 +380,14 @@ shutdown_rest () GNUNET_NO); stats = NULL; } + /* Destroy tunnels. Note that all channels must be destroyed first! */ + GCP_iterate_all (&destroy_tunnels_now, + NULL); + /* All tunnels, channels, connections and CORE must be down before this point. */ + GCP_iterate_all (&destroy_paths_now, + NULL); + /* All paths, tunnels, channels, connections and CORE must be down before this point. */ + GCP_destroy_all_peers (); if (NULL != open_ports) { GNUNET_CONTAINER_multihashmap_destroy (open_ports); @@ -390,14 +398,6 @@ shutdown_rest () GNUNET_CONTAINER_multihashmap_destroy (loose_channels); loose_channels = NULL; } - /* Destroy tunnels. Note that all channels must be destroyed first! */ - GCP_iterate_all (&destroy_tunnels_now, - NULL); - /* All tunnels, channels, connections and CORE must be down before this point. */ - GCP_iterate_all (&destroy_paths_now, - NULL); - /* All paths, tunnels, channels, connections and CORE must be down before this point. */ - GCP_destroy_all_peers (); if (NULL != peers) { GNUNET_CONTAINER_multipeermap_destroy (peers); -- cgit v1.2.3