gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r14519 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r14519 - gnunet/src/dht
Date: Thu, 24 Feb 2011 12:19:09 +0100

Author: nevans
Date: 2011-02-24 12:19:09 +0100 (Thu, 24 Feb 2011)
New Revision: 14519

Modified:
   gnunet/src/dht/dht_api.c
Log:
possible fix for mantis bug 1663

Modified: gnunet/src/dht/dht_api.c
===================================================================
--- gnunet/src/dht/dht_api.c    2011-02-24 11:00:43 UTC (rev 14518)
+++ gnunet/src/dht/dht_api.c    2011-02-24 11:19:09 UTC (rev 14519)
@@ -287,7 +287,7 @@
                const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct GNUNET_DHT_Handle *handle = cls;
-
+  handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
   if (handle->retry_time.rel_value < GNUNET_CONSTANTS_SERVICE_RETRY.rel_value)
     handle->retry_time = GNUNET_CONSTANTS_SERVICE_RETRY;
   else
@@ -328,7 +328,7 @@
 {
   if (handle->client == NULL)
     return;
-
+  GNUNET_assert(handle->reconnect_task == GNUNET_SCHEDULER_NO_TASK);
   GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO);
   handle->client = NULL;
   handle->reconnect_task = GNUNET_SCHEDULER_add_delayed (handle->retry_time,
@@ -607,6 +607,8 @@
       GNUNET_CLIENT_disconnect (handle->client, GNUNET_YES);
       handle->client = NULL;
     }  
+  if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
+    GNUNET_SCHEDULER_cancel(handle->reconnect_task);
   GNUNET_CONTAINER_multihashmap_destroy(handle->active_requests);
   GNUNET_free (handle);
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]