summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 1f09bc43a9..bc8864aba4 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1616,8 +1616,10 @@ void assert_connection_ok(connection_t *conn, time_t now)
tor_assert(conn->socks_request);
if (conn->state == AP_CONN_STATE_OPEN) {
tor_assert(conn->socks_request->has_finished);
- tor_assert(conn->cpath_layer);
- assert_cpath_layer_ok(conn->cpath_layer);
+ if (!conn->marked_for_close) {
+ tor_assert(conn->cpath_layer);
+ assert_cpath_layer_ok(conn->cpath_layer);
+ }
}
} else {
tor_assert(!conn->socks_request);