From f5d41b56a0c95429c82817e8e6bc8e45677fef76 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 20 Oct 2011 11:19:04 +0000 Subject: [PATCH] fix #1826 --- src/core/gnunet-service-core_neighbours.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c index 505b1797b..596836216 100644 --- a/src/core/gnunet-service-core_neighbours.c +++ b/src/core/gnunet-service-core_neighbours.c @@ -502,6 +502,8 @@ free_neighbour_helper (void *cls, const GNUNET_HashCode * key, void *value) { struct Neighbour *n = value; + /* transport should have 'disconnected' all neighbours... */ + GNUNET_break (0); free_neighbour (n); return GNUNET_OK; } @@ -515,10 +517,10 @@ GSC_NEIGHBOURS_done () { if (NULL == transport) return; - GNUNET_CONTAINER_multihashmap_iterate (neighbours, &free_neighbour_helper, - NULL); GNUNET_TRANSPORT_disconnect (transport); transport = NULL; + GNUNET_CONTAINER_multihashmap_iterate (neighbours, &free_neighbour_helper, + NULL); GNUNET_CONTAINER_multihashmap_destroy (neighbours); neighbours = NULL; } -- 2.25.1