aboutsummaryrefslogtreecommitdiff
path: root/src/or/hibernate.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-03-27 04:55:13 +0000
committerRoger Dingledine <arma@torproject.org>2005-03-27 04:55:13 +0000
commit36baf7219d458449cbbdac9b61cc34492f85fb88 (patch)
tree4b618242ed0830bdc1a7c520cf0720c35bb76988 /src/or/hibernate.c
parentefb5db449a13a6cf87799c71a84b18b144e6e163 (diff)
downloadtor-36baf7219d458449cbbdac9b61cc34492f85fb88.tar
tor-36baf7219d458449cbbdac9b61cc34492f85fb88.tar.gz
stop most cases of hanging up on a socks connection without sending
the socks reject. audit for remaining ones. also make things more uniform so we always remember to hold-open-until-flushed, etc. svn:r3891
Diffstat (limited to 'src/or/hibernate.c')
-rw-r--r--src/or/hibernate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index a9cbdd6b7..b44c03e6f 100644
--- a/src/or/hibernate.c
+++ b/src/or/hibernate.c
@@ -741,7 +741,10 @@ hibernate_go_dormant(time_t now) {
connection_edge_end(conn, END_STREAM_REASON_HIBERNATING,
conn->cpath_layer);
log_fn(LOG_INFO,"Closing conn type %d", conn->type);
- connection_mark_for_close(conn);
+ if (conn->type == CONN_TYPE_AP) /* send socks failure if needed */
+ connection_close_unattached_ap(conn, END_STREAM_REASON_HIBERNATING);
+ else
+ connection_mark_for_close(conn);
}
accounting_record_bandwidth_usage(now);