summaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-03-15 09:19:00 -0400
committerNick Mathewson <nickm@torproject.org>2017-03-15 11:05:37 -0400
commitec5fe41209add4b216029466774a6b7e833210ef (patch)
tree718877f6ca5a2a0db49d8e0992ca6e7eee2f4991 /src/or/onion.c
parent4488c319dde4c986da01a4635edaabeb1bc574a4 (diff)
downloadtor-ec5fe41209add4b216029466774a6b7e833210ef.tar.gz
tor-ec5fe41209add4b216029466774a6b7e833210ef.zip
Avoid a double-mark bug when makring a pending circuit as "too old"
Fixes bug 20059; bugfix on 0.1.0.1-rc.
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index 1a0bcf106e..de4b6a5845 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -184,7 +184,9 @@ onion_pending_add(or_circuit_t *circ, create_cell_t *onionskin)
onion_queue_entry_remove(head);
log_info(LD_CIRC,
"Circuit create request is too old; canceling due to overload.");
- circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_RESOURCELIMIT);
+ if (! TO_CIRCUIT(circ)->marked_for_close) {
+ circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_RESOURCELIMIT);
+ }
}
return 0;
}