mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Merge branch 'bug2181' into maint-0.2.2
This commit is contained in:
commit
e6da9a98e9
4
changes/bug2181
Normal file
4
changes/bug2181
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor features
|
||||||
|
- Log a little more clearly about the times at which we're no longer
|
||||||
|
accepting new connections. Resolves bug 2181.
|
||||||
|
|
@ -900,7 +900,9 @@ is non-zero):
|
|||||||
period, or receive more than that number in the period. For example, with
|
period, or receive more than that number in the period. For example, with
|
||||||
AccountingMax set to 1 GB, a server could send 900 MB and receive 800 MB
|
AccountingMax set to 1 GB, a server could send 900 MB and receive 800 MB
|
||||||
and continue running. It will only hibernate once one of the two reaches 1
|
and continue running. It will only hibernate once one of the two reaches 1
|
||||||
GB. When the number of bytes is exhausted, Tor will hibernate until some
|
GB. When the number of bytes gets low, Tor will stop accepting new
|
||||||
|
connections and circuits. When the number of bytes
|
||||||
|
is exhausted, Tor will hibernate until some
|
||||||
time in the next accounting period. To prevent all servers from waking at
|
time in the next accounting period. To prevent all servers from waking at
|
||||||
the same time, Tor will also wait until a random point in each period
|
the same time, Tor will also wait until a random point in each period
|
||||||
before waking up. If you have bandwidth cost issues, enabling hibernation
|
before waking up. If you have bandwidth cost issues, enabling hibernation
|
||||||
|
@ -783,7 +783,8 @@ hibernate_begin(hibernate_state_t new_state, time_t now)
|
|||||||
/* XXX upload rendezvous service descriptors with no intro points */
|
/* XXX upload rendezvous service descriptors with no intro points */
|
||||||
|
|
||||||
if (new_state == HIBERNATE_STATE_EXITING) {
|
if (new_state == HIBERNATE_STATE_EXITING) {
|
||||||
log_notice(LD_GENERAL,"Interrupt: will shut down in %d seconds. Interrupt "
|
log_notice(LD_GENERAL,"Interrupt: we have stopped accepting new "
|
||||||
|
"connections, and will shut down in %d seconds. Interrupt "
|
||||||
"again to exit now.", options->ShutdownWaitLength);
|
"again to exit now.", options->ShutdownWaitLength);
|
||||||
shutdown_time = time(NULL) + options->ShutdownWaitLength;
|
shutdown_time = time(NULL) + options->ShutdownWaitLength;
|
||||||
} else { /* soft limit reached */
|
} else { /* soft limit reached */
|
||||||
@ -940,7 +941,8 @@ consider_hibernation(time_t now)
|
|||||||
if (hibernate_state == HIBERNATE_STATE_LIVE) {
|
if (hibernate_state == HIBERNATE_STATE_LIVE) {
|
||||||
if (hibernate_soft_limit_reached()) {
|
if (hibernate_soft_limit_reached()) {
|
||||||
log_notice(LD_ACCT,
|
log_notice(LD_ACCT,
|
||||||
"Bandwidth soft limit reached; commencing hibernation.");
|
"Bandwidth soft limit reached; commencing hibernation. "
|
||||||
|
"No new conncetions will be accepted");
|
||||||
hibernate_begin(HIBERNATE_STATE_LOWBANDWIDTH, now);
|
hibernate_begin(HIBERNATE_STATE_LOWBANDWIDTH, now);
|
||||||
} else if (accounting_enabled && now < interval_wakeup_time) {
|
} else if (accounting_enabled && now < interval_wakeup_time) {
|
||||||
format_local_iso_time(buf,interval_wakeup_time);
|
format_local_iso_time(buf,interval_wakeup_time);
|
||||||
|
Loading…
Reference in New Issue
Block a user