|
@@ -110,9 +110,6 @@ struct rend_service_port_config_s {
|
|
|
|
|
|
|
|
|
#define INTRO_CIRC_RETRY_PERIOD (60*5)
|
|
|
-
|
|
|
- * for a while.*/
|
|
|
-#define MAX_INTRO_CIRCS_PER_PERIOD 10
|
|
|
|
|
|
* a requested rendezvous point before giving up? */
|
|
|
#define MAX_REND_FAILURES 1
|
|
@@ -4036,6 +4033,18 @@ rend_service_desc_has_uploaded(const rend_data_t *rend_data)
|
|
|
} SMARTLIST_FOREACH_END(intro);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * for a while. Dynamically calculated based on the configured number of
|
|
|
+ * introduction points for the service, n_intro_points_wanted. */
|
|
|
+static int
|
|
|
+rend_max_intro_circs_per_period(unsigned int n_intro_points_wanted)
|
|
|
+{
|
|
|
+
|
|
|
+ * retried. (If all fail, we *want* to wait, because something is broken.) */
|
|
|
+ tor_assert(n_intro_points_wanted <= NUM_INTRO_POINTS_MAX);
|
|
|
+ return (int)(2*n_intro_points_wanted + NUM_INTRO_POINTS_EXTRA);
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
* - Invalidate introdution points based on specific criteria, see
|
|
|
* remove_invalid_intro_points comments.
|
|
@@ -4091,7 +4100,8 @@ rend_consider_services_intro_points(void)
|
|
|
service->intro_period_started = now;
|
|
|
service->n_intro_circuits_launched = 0;
|
|
|
} else if (service->n_intro_circuits_launched >=
|
|
|
- MAX_INTRO_CIRCS_PER_PERIOD) {
|
|
|
+ rend_max_intro_circs_per_period(
|
|
|
+ service->n_intro_points_wanted)) {
|
|
|
|
|
|
* one before we try to initiate any more connections. */
|
|
|
continue;
|