From: Christian Grothoff Date: Tue, 10 Nov 2009 19:53:09 +0000 (+0000) Subject: do not auto-reconnect during shutdown: X-Git-Tag: initial-import-from-subversion-38251~23120 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=944a67de015014375a3e4352ac860b59599dd5a4;p=oweals%2Fgnunet.git do not auto-reconnect during shutdown: --- diff --git a/src/util/client.c b/src/util/client.c index 80ea6d644..cb834031c 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -747,13 +747,12 @@ client_notify (void *cls, size_t size, void *buf) 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, diff --git a/src/util/connection.c b/src/util/connection.c index e09c0cd9e..993a3c783 100644 --- a/src/util/connection.c +++ b/src/util/connection.c @@ -543,7 +543,6 @@ connect_fail_continuation (struct GNUNET_CONNECTION_Handle *h) 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)) {