mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 22:47:12 +01:00
Go into soft hibernation after 95% of the bandwidth is used,
not 99%. This is especially important for daily hibernators who have a small accounting max. Hopefully it will result in fewer cut connections when the hard hibernation starts. svn:r3488
This commit is contained in:
parent
2e97593d25
commit
1e847aebb1
1 changed files with 1 additions and 1 deletions
|
@ -641,7 +641,7 @@ hibernate_hard_limit_reached(void)
|
||||||
* to send/receive this interval. */
|
* to send/receive this interval. */
|
||||||
static int hibernate_soft_limit_reached(void)
|
static int hibernate_soft_limit_reached(void)
|
||||||
{
|
{
|
||||||
uint64_t soft_limit = (uint64_t) ((get_options()->AccountingMax) * .99);
|
uint64_t soft_limit = (uint64_t) ((get_options()->AccountingMax) * .95);
|
||||||
if (!soft_limit)
|
if (!soft_limit)
|
||||||
return 0;
|
return 0;
|
||||||
return n_bytes_read_in_interval >= soft_limit
|
return n_bytes_read_in_interval >= soft_limit
|
||||||
|
|
Loading…
Add table
Reference in a new issue