diff --git a/changes/bug20059 b/changes/bug20059 new file mode 100644 index 0000000000000000000000000000000000000000..091fab06d14ddd040b72158f81dd14ccdc9d289b --- /dev/null +++ b/changes/bug20059 @@ -0,0 +1,3 @@ + o Minor bugfixes (relay): + - Avoid a double-marked-circuit warning that can happen when we receive + DESTROY cells under heavy load. Fixes bug 20059; bugfix on 0.1.0.1-rc. diff --git a/src/or/onion.c b/src/or/onion.c index a987883802972bb32142df19239e7aba920439ce..4b803a785ca8850a2d972842fd4535867cfd3154 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -235,7 +235,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; }