fixing 1804
authorChristian Grothoff <christian@grothoff.org>
Thu, 29 Sep 2011 14:55:29 +0000 (14:55 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 29 Sep 2011 14:55:29 +0000 (14:55 +0000)
src/dht/gnunet-service-dht_neighbours.c

index d226376c9008c14d67a69c8d18544f145fc7445f..6ecebb965ee2103220d741c67e08d1a709aea131 100644 (file)
@@ -714,6 +714,11 @@ handle_core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
     GNUNET_CORE_peer_change_preference_cancel (to_remove->info_ctx);
     to_remove->info_ctx = NULL;
   }
+  if (GNUNET_SCHEDULER_NO_TASK != to_remove->preference_task)
+  {
+    GNUNET_SCHEDULER_cancel (to_remove->preference_task);
+    to_remove->preference_task = GNUNET_SCHEDULER_NO_TASK;
+  }
   current_bucket = find_bucket (&to_remove->id.hashPubKey);
   GNUNET_CONTAINER_DLL_remove (k_buckets[current_bucket].head,
                               k_buckets[current_bucket].tail,