aboutsummaryrefslogtreecommitdiff
path: root/src/or/cpuworker.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-26 10:19:07 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-26 10:19:07 -0500
commita598d0f575afab3836a48c9efc9f59e2bd5beab1 (patch)
treefd8acc71275e275141ea9fc254c563d383024384 /src/or/cpuworker.c
parent525a2ce6e3098930065d1e9e0c87e7c8da5b1607 (diff)
downloadtor-a598d0f575afab3836a48c9efc9f59e2bd5beab1.tar.gz
tor-a598d0f575afab3836a48c9efc9f59e2bd5beab1.zip
Bail early in cpuworker_onion_handshake_replyfn if the circuit is marked
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r--src/or/cpuworker.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 0785c671d9..3ddb37a262 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -347,6 +347,12 @@ cpuworker_onion_handshake_replyfn(void *work_)
circ->workqueue_entry = NULL;
+ if (TO_CIRCUIT(circ)->marked_for_close) {
+ /* We already marked this circuit; we can't call it open. */
+ log_debug(LD_OR,"circuit is already marked.");
+ goto done_processing;
+ }
+
if (rpl.success == 0) {
log_debug(LD_OR,
"decoding onionskin failed. "