gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9450 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r9450 - gnunet/src/util
Date: Tue, 10 Nov 2009 12:53:09 -0700

Author: grothoff
Date: 2009-11-10 12:53:09 -0700 (Tue, 10 Nov 2009)
New Revision: 9450

Modified:
   gnunet/src/util/client.c
   gnunet/src/util/connection.c
Log:
do not auto-reconnect during shutdown:


Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c    2009-11-10 19:45:42 UTC (rev 9449)
+++ gnunet/src/util/client.c    2009-11-10 19:53:09 UTC (rev 9450)
@@ -747,13 +747,12 @@
   th->sock->th = NULL;
   if (buf == NULL)
     {
-      // FIXME: need a way to check if the
-      // reason is SHUTDOWN (not timeout) and
-      // if so NOT retry!
       delay = GNUNET_TIME_absolute_get_remaining (th->timeout);
       delay.value /= 2;
-      if ((GNUNET_YES != th->auto_retry) ||
-          (0 == --th->attempts_left) || (delay.value < 1))
+      if ( (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & 
GNUNET_SCHEDULER_get_reason (th->sched))) ||
+          (GNUNET_YES != th->auto_retry) ||
+          (0 == --th->attempts_left) || 
+          (delay.value < 1) )
         {
 #if DEBUG_CLIENT
           GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,

Modified: gnunet/src/util/connection.c
===================================================================
--- gnunet/src/util/connection.c        2009-11-10 19:45:42 UTC (rev 9449)
+++ gnunet/src/util/connection.c        2009-11-10 19:53:09 UTC (rev 9450)
@@ -543,7 +543,6 @@
   GNUNET_break (h->dns_active == GNUNET_NO);
   GNUNET_break (h->sock == NULL);
 
-  /* FIXME: trigger delayed reconnect attempt... */
   /* trigger jobs that used to wait on "connect_task" */
   if (0 != (h->ccs & COCO_RECEIVE_AGAIN))
     {





reply via email to

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