]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Log info about intro point limits when they are reached and reset
authorteor <teor2345@gmail.com>
Sat, 4 Mar 2017 11:46:19 +0000 (22:46 +1100)
committerNick Mathewson <nickm@torproject.org>
Tue, 14 Mar 2017 15:54:08 +0000 (11:54 -0400)
Depends on 21594, part of 21622.

src/or/rendservice.c

index 2b7c6bfb69623aa8365546f481d897b7f8631fd2..82e31377cffad98255a9e945284d6587eb4dcdcf 100644 (file)
@@ -4136,8 +4136,12 @@ rend_consider_services_intro_points(void)
 
     /* This retry period is important here so we don't stress circuit
      * creation. */
+
     if (now > service->intro_period_started + INTRO_CIRC_RETRY_PERIOD) {
-      /* One period has elapsed; we can try building circuits again. */
+      /* One period has elapsed:
+       *  - if we stopped, we can try building circuits again,
+       *  - if we haven't, we reset the circuit creation counts. */
+      rend_log_intro_limit(service, LOG_INFO);
       service->intro_period_started = now;
       service->n_intro_circuits_launched = 0;
     } else if (service->n_intro_circuits_launched >=
@@ -4145,6 +4149,7 @@ rend_consider_services_intro_points(void)
                                       service->n_intro_points_wanted)) {
       /* We have failed too many times in this period; wait for the next
        * one before we try to initiate any more connections. */
+      rend_log_intro_limit(service, LOG_WARN);
       continue;
     }