aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-11-25 17:21:11 -0500
committerNick Mathewson <nickm@torproject.org>2011-11-25 17:21:11 -0500
commit633071eb3bcf2c4106e93de28d727594bd23b1db (patch)
treef31efa8098eb2b1e71ec97c4f81ffa428b142c14 /src/or
parent7920ea55b8d994268d2b07f27316b0f34d8f27e5 (diff)
downloadtor-633071eb3bcf2c4106e93de28d727594bd23b1db.tar
tor-633071eb3bcf2c4106e93de28d727594bd23b1db.tar.gz
Avoid a double-mark in connection_or_close_connection_cb
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection_or.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index cbdfa4458..e868b7b78 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -1159,10 +1159,12 @@ connection_or_tls_renegotiated_cb(tor_tls_t *tls, void *_conn)
static void
connection_or_close_connection_cb(void *_conn)
{
- or_connection_t *conn = _conn;
+ or_connection_t *or_conn = _conn;
+ connection_t *conn = TO_CONN(or_conn);
- connection_stop_reading(TO_CONN(conn));
- connection_mark_for_close(TO_CONN(conn));
+ connection_stop_reading(conn);
+ if (!conn->marked_for_close)
+ connection_mark_for_close(conn);
}
/** Move forward with the tls handshake. If it finishes, hand