-cancel reconnect task
authorChristian Grothoff <christian@grothoff.org>
Fri, 8 Jul 2016 18:08:06 +0000 (18:08 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 8 Jul 2016 18:08:06 +0000 (18:08 +0000)
src/transport/transport_api_get_hello.c

index 9a65616a9cbcbf6bfb1aab087309aa6976b564bd..5a9efcd14fe093415935bf7eb96e17cb985fc690 100644 (file)
@@ -251,6 +251,11 @@ GNUNET_TRANSPORT_get_hello (const struct GNUNET_CONFIGURATION_Handle *cfg,
 void
 GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_GetHelloHandle *ghh)
 {
+  if (NULL != ghh->reconnect_task)
+  {
+    GNUNET_SCHEDULER_cancel (ghh->reconnect_task);
+    ghh->reconnect_task = NULL;
+  }
   if (NULL != ghh->mq)
   {
     GNUNET_MQ_destroy (ghh->mq);