aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-09 11:14:34 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-09 11:14:34 +0000
commitca070e7de6b0196b185d58efc033c875626d21e7 (patch)
tree4916ed0ae2f24a5eaeb19111dc8fea79a1776f81 /src
parentb773045a584c73c7e3c902bf7eef76eea9b7469e (diff)
downloadtor-ca070e7de6b0196b185d58efc033c875626d21e7.tar
tor-ca070e7de6b0196b185d58efc033c875626d21e7.tar.gz
bugfix: ^c ought to work even while hibernating
svn:r2748
Diffstat (limited to 'src')
-rw-r--r--src/or/hibernate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index c01d1c32c..b604ef4f6 100644
--- a/src/or/hibernate.c
+++ b/src/or/hibernate.c
@@ -195,6 +195,9 @@ update_expected_bandwidth(void)
{
uint64_t used;
uint32_t max_configured = (get_options()->BandwidthRateBytes * 60);
+ /* XXX max_configured will be false if it exceeds
+ * get_options()->AccountingMaxKB*1000, right? -RD
+ */
if (n_seconds_active_in_interval < 1800) {
expected_bandwidth_usage = max_configured;
@@ -449,8 +452,6 @@ static void hibernate_begin(int new_state, time_t now) {
exit(0);
}
- tor_assert(hibernate_state == HIBERNATE_STATE_LIVE);
-
/* close listeners. leave control listener(s). */
while((conn = connection_get_by_type(CONN_TYPE_OR_LISTENER)) ||
(conn = connection_get_by_type(CONN_TYPE_AP_LISTENER)) ||
@@ -466,7 +467,6 @@ static void hibernate_begin(int new_state, time_t now) {
log(LOG_NOTICE,"Interrupt: will shut down in %d seconds. Interrupt again to exit now.", SHUTDOWN_WAIT_LENGTH);
hibernate_end_time = time(NULL) + SHUTDOWN_WAIT_LENGTH;
} else { /* soft limit reached */
- log_fn(LOG_NOTICE,"Bandwidth limit reached; beginning hibernation.");
hibernate_end_time = interval_end_time;
}