summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-03-03 07:24:53 +0000
committerRoger Dingledine <arma@torproject.org>2004-03-03 07:24:53 +0000
commitdbdd2eaa2a00ab9144c118b975fe5ec5e9e57312 (patch)
tree03b56a47fd5bf927ec18189cc46fb011326709a9
parent3c71d09402ed58fab896f27ab7b668b547e8ab5e (diff)
downloadtor-dbdd2eaa2a00ab9144c118b975fe5ec5e9e57312.tar.gz
tor-dbdd2eaa2a00ab9144c118b975fe5ec5e9e57312.zip
don't mark_for_close again when the destroy arrives after the end cell
svn:r1211
-rw-r--r--src/or/connection_edge.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 5855b34695..38aedb385f 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -92,6 +92,8 @@ int connection_edge_process_inbuf(connection_t *conn) {
int connection_edge_destroy(uint16_t circ_id, connection_t *conn) {
assert(conn->type == CONN_TYPE_AP || conn->type == CONN_TYPE_EXIT);
+ if(conn->marked_for_close)
+ return 0; /* already marked; probably got an 'end' */
log_fn(LOG_INFO,"CircID %d: At an edge. Marking connection for close.",
circ_id);
conn->has_sent_end = 1; /* we're closing the circuit, nothing to send to */