-LRN: cancel the task when lookup is aborted
authorChristian Grothoff <christian@grothoff.org>
Tue, 3 Jul 2012 19:15:55 +0000 (19:15 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 3 Jul 2012 19:15:55 +0000 (19:15 +0000)
src/gns/gnunet-service-gns_resolver.c

index feb49ade1e30abef72a94b3eaa47315d8ef8d243..b2be8811db1f431128e3d1f26e1e934140aac348 100644 (file)
@@ -3666,6 +3666,8 @@ gns_resolver_lookup_record (struct GNUNET_CRYPTO_ShortHashCode zone,
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "Cannot handle this TLD %s\n", string_hash);
       
+      if (GNUNET_SCHEDULER_NO_TASK != rh->timeout_task)
+        GNUNET_SCHEDULER_cancel (rh->timeout_task);
       GNUNET_CONTAINER_DLL_remove (rlh_head, rlh_tail, rh);
       GNUNET_free (rh);
       GNUNET_free (rlh);