aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2024-10-16 09:05:34 -0400
committerDavid Goulet <dgoulet@torproject.org>2024-10-16 09:05:34 -0400
commit8f43b97895c2fb3179a83b4535c5fc2a97d75998 (patch)
treec8e21fd4fbd71019d62b3d0747be62f8a72a9369 /src
parent605f30c4865d8d462e4fd80c4e164862e0573548 (diff)
parent7cca6dc1a36ff201eaab62a11699259e3ef9ce22 (diff)
downloadtor-8f43b97895c2fb3179a83b4535c5fc2a97d75998.tar.gz
tor-8f43b97895c2fb3179a83b4535c5fc2a97d75998.zip
Merge branch 'maint-0.4.8'
Diffstat (limited to 'src')
-rw-r--r--src/core/or/circuituse.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 33886e9919..6a73fbe87c 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -1202,8 +1202,13 @@ circuit_predict_and_launch_new(void)
int flags = 0;
/* Attempt to launch predicted conflux circuits. This is outside the HS or
- * Exit preemptive circuit set. */
- conflux_predict_new(now);
+ * Exit preemptive circuit set.
+ * As with the other types of preemptive circuits, we only want to
+ * launch them if we have predicted ports. (If we haven't needed a
+ * circuit for a while, maybe we won't need one soon either.) */
+ if (predicted_ports_prediction_time_remaining(now)) {
+ conflux_predict_new(now);
+ }
/* Count how many of each type of circuit we currently have. */
SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, circ) {