fix
authorChristian Grothoff <christian@grothoff.org>
Tue, 7 Jun 2011 10:23:28 +0000 (10:23 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 7 Jun 2011 10:23:28 +0000 (10:23 +0000)
src/core/gnunet-service-core.c

index 90801f34a3998b2b186e3fa64ef62ae35c205d58..4f02d0fc28743ee0732097a3566f0d1077d23242 100644 (file)
@@ -4577,6 +4577,8 @@ cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Core service shutting down.\n");
 #endif
+  GNUNET_TRANSPORT_disconnect (transport);
+  transport = NULL;
   GNUNET_CONTAINER_multihashmap_iterate (neighbours,
                                         &free_neighbour_helper,
                                         NULL);
@@ -4584,8 +4586,6 @@ cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   neighbours = NULL;
   GNUNET_STATISTICS_set (stats, gettext_noop ("# neighbour entries allocated"), 0, GNUNET_NO);
   GNUNET_assert (transport != NULL);
-  GNUNET_TRANSPORT_disconnect (transport);
-  transport = NULL;
   GNUNET_SERVER_notification_context_destroy (notifier);
   notifier = NULL;
   while (NULL != (c = clients))