aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-10-31 20:28:41 +0000
committerRoger Dingledine <arma@torproject.org>2004-10-31 20:28:41 +0000
commit984ffec105efe836c63772a6c30ced8fc03886d8 (patch)
tree33efb72b475ce9971041651d8464d57af47926c0 /src/or/connection_edge.c
parentae7495dd55e0e3346e1e18eefbe6aa95dc6fdf33 (diff)
downloadtor-984ffec105efe836c63772a6c30ced8fc03886d8.tar
tor-984ffec105efe836c63772a6c30ced8fc03886d8.tar.gz
implement first piece of hibernation
still need to track bandwidth, and make decisions based on bandwidth svn:r2630
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index bb2ca80af..e7eec0533 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -804,6 +804,11 @@ int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
n_stream->state = EXIT_CONN_STATE_RESOLVEFAILED;
/* default to failed, change in dns_resolve if it turns out not to fail */
+ if(we_are_hibernating()) {
+ connection_edge_end(n_stream, END_STREAM_REASON_EXITPOLICY, n_stream->cpath_layer);
+ connection_free(n_stream);
+ }
+
/* send it off to the gethostbyname farm */
switch(dns_resolve(n_stream)) {
case 1: /* resolve worked */