summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 36dc1c1643..1fbe5a82b9 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -389,6 +389,9 @@ circuit_expire_building(time_t now)
/* Circuits are allowed to last longer for measurement.
* Switch their purpose and wait. */
if (victim->purpose != CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT) {
+ control_event_circuit_status(TO_ORIGIN_CIRCUIT(victim),
+ CIRC_EVENT_FAILED,
+ END_CIRC_REASON_TIMEOUT);
victim->purpose = CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT;
/* Record this failure to check for too many timeouts
* in a row. This function does not record a time value yet
@@ -430,7 +433,10 @@ circuit_expire_building(time_t now)
circuit_state_to_string(victim->state), victim->purpose);
circuit_log_path(LOG_INFO,LD_CIRC,TO_ORIGIN_CIRCUIT(victim));
- circuit_mark_for_close(victim, END_CIRC_REASON_TIMEOUT);
+ if (victim->purpose == CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT)
+ circuit_mark_for_close(victim, END_CIRC_REASON_MEASUREMENT_EXPIRED);
+ else
+ circuit_mark_for_close(victim, END_CIRC_REASON_TIMEOUT);
}
}