-assert on task
authorChristian Grothoff <christian@grothoff.org>
Sun, 19 Jun 2016 22:39:09 +0000 (22:39 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 19 Jun 2016 22:39:09 +0000 (22:39 +0000)
src/dht/gnunet-service-dht_neighbours.c

index 8ab39c9aaf71d132c8ec3c459197e416b82004e0..773ad8983c0748ad052ae774055615c78369bf50 100644 (file)
@@ -752,8 +752,10 @@ send_find_peer_message (void *cls)
                                 DHT_MAXIMUM_FIND_PEER_INTERVAL.rel_value_us /
                                 (newly_found_peers + 1));
   newly_found_peers = 0;
+  GNUNET_assert (NULL == find_peer_task);
   find_peer_task =
-      GNUNET_SCHEDULER_add_delayed (next_send_time, &send_find_peer_message,
+      GNUNET_SCHEDULER_add_delayed (next_send_time,
+                                    &send_find_peer_message,
                                     NULL);
 }
 
@@ -821,6 +823,7 @@ handle_core_connect (void *cls,
       (GNUNET_YES != disable_try_connect))
   {
     /* got a first connection, good time to start with FIND PEER requests... */
+    GNUNET_assert (NULL == find_peer_task);
     find_peer_task = GNUNET_SCHEDULER_add_now (&send_find_peer_message,
                                                NULL);
   }