From fe47552ffff24cba527b7c36ca5df3545a26c108 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 9 Dec 2003 02:06:58 +0000 Subject: [PATCH] close the circuit when we get a truncated cell svn:r893 --- trunk/src/or/circuit.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trunk/src/or/circuit.c b/trunk/src/or/circuit.c index 05307769e2..c2bf755002 100644 --- a/trunk/src/or/circuit.c +++ b/trunk/src/or/circuit.c @@ -989,6 +989,13 @@ int circuit_truncated(circuit_t *circ, crypt_path_t *layer) { assert(circ); assert(layer); + /* XXX Since we don't ask for truncates currently, getting a truncated + * means that a connection broke or an extend failed. For now, + * just give up. + */ + circuit_close(circ); + return 0; + while(layer->next != circ->cpath) { /* we need to clear out layer->next */ victim = layer->next;