-fix off-by-1
[oweals/gnunet.git] / src / dht / gnunet-service-dht.c
index 1aeca9b85cf18812508b0529a5a4b7d3be71bcb9..a44be2dfe6bc50580b3e58275606a01544185cef 100644 (file)
@@ -161,9 +161,8 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
     shutdown_task (NULL);
     return;
   }
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                                &shutdown_task,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+                                NULL);
   GDS_transport_handle =
       GNUNET_TRANSPORT_connect (GDS_cfg, NULL, NULL, NULL, NULL, NULL);
   if (GDS_transport_handle == NULL)