cleaner
authorChristian Grothoff <christian@grothoff.org>
Fri, 15 Jul 2011 14:12:49 +0000 (14:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 15 Jul 2011 14:12:49 +0000 (14:12 +0000)
src/core/core_api.c

index af46c6e63464b9fdef2a5a40651e07c1d826a59d..7f7928fd3826ea2082776543304dfdf083592de2 100644 (file)
@@ -490,11 +490,15 @@ reconnect_later (struct GNUNET_CORE_Handle *h)
   struct PeerRecord *pr;
 
   GNUNET_assert (h->reconnect_task == GNUNET_SCHEDULER_NO_TASK);
+  if (NULL != h->cth)
+    {
+      GNUNET_CLIENT_notify_transmit_ready_cancel (h->cth);
+      h->cth = NULL;
+    }
   if (h->client != NULL)
     {
       GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
       h->client = NULL;
-      h->cth = NULL;
     }
   h->currently_down = GNUNET_YES;
   GNUNET_assert (h->reconnect_task == GNUNET_SCHEDULER_NO_TASK);