summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/circuituse.c3
-rw-r--r--src/or/config.c1
-rw-r--r--src/or/or.h4
3 files changed, 7 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 9778ae7b29..c07d434b7c 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -553,7 +553,8 @@ circuit_expire_building(void)
/* If this is a service-side rendezvous circuit which is far
* enough along in connecting to its destination, consider sparing
* it. */
- if (!(TO_ORIGIN_CIRCUIT(victim)->hs_circ_has_timed_out) &&
+ if (!(options->CloseHSServiceRendCircuitsImmediatelyOnTimeout) &&
+ !(TO_ORIGIN_CIRCUIT(victim)->hs_circ_has_timed_out) &&
victim->purpose == CIRCUIT_PURPOSE_S_CONNECT_REND) {
log_info(LD_CIRC,"Marking circ %s:%d:%d (state %d:%s, purpose %d) "
"as timed-out HS circ; relaunching rendezvous attempt.",
diff --git a/src/or/config.c b/src/or/config.c
index 3374459b40..da4f3c195b 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -307,6 +307,7 @@ static config_var_t _option_vars[] = {
V(HSAuthoritativeDir, BOOL, "0"),
OBSOLETE("HSAuthorityRecordStats"),
V(CloseHSClientCircuitsImmediatelyOnTimeout, BOOL, "0"),
+ V(CloseHSServiceRendCircuitsImmediatelyOnTimeout, BOOL, "0"),
V(HTTPProxy, STRING, NULL),
V(HTTPProxyAuthenticator, STRING, NULL),
V(HTTPSProxy, STRING, NULL),
diff --git a/src/or/or.h b/src/or/or.h
index 3ac8b92516..e246ac42e2 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -3066,6 +3066,10 @@ typedef struct {
* an INTRODUCE1 cell on its way to the service. */
int CloseHSClientCircuitsImmediatelyOnTimeout;
+ /** Close hidden-service-side rendezvous circuits immediately when
+ * they reach the normal circuit-build timeout. */
+ int CloseHSServiceRendCircuitsImmediatelyOnTimeout;
+
int ConnLimit; /**< Demanded minimum number of simultaneous connections. */
int _ConnLimit; /**< Maximum allowed number of simultaneous connections. */
int RunAsDaemon; /**< If true, run in the background. (Unix only) */