mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Rename connection_bucket_refill to connection_bucket_refill_all
Also document its actual behavior
This commit is contained in:
parent
993f5d284d
commit
1356d51af6
@ -3178,9 +3178,10 @@ connection_bucket_adjust(const or_options_t *options)
|
||||
}
|
||||
}
|
||||
|
||||
/** Time has passed; increment buckets appropriately. */
|
||||
/** Time has passed; increment buckets appropriately and re-enable formerly
|
||||
* blocked connections. */
|
||||
void
|
||||
connection_bucket_refill(time_t now, uint32_t now_ts)
|
||||
connection_bucket_refill_all(time_t now, uint32_t now_ts)
|
||||
{
|
||||
smartlist_t *conns = get_connection_array();
|
||||
|
||||
|
@ -123,8 +123,8 @@ ssize_t connection_bucket_write_limit(connection_t *conn, time_t now);
|
||||
int global_write_bucket_low(connection_t *conn, size_t attempt, int priority);
|
||||
void connection_bucket_init(void);
|
||||
void connection_bucket_adjust(const or_options_t *options);
|
||||
void connection_bucket_refill(time_t now,
|
||||
uint32_t now_ts);
|
||||
void connection_bucket_refill_all(time_t now,
|
||||
uint32_t now_ts);
|
||||
void connection_read_bw_exhausted(connection_t *conn, bool is_global_bw);
|
||||
void connection_write_bw_exhausted(connection_t *conn, bool is_global_bw);
|
||||
void connection_consider_empty_read_buckets(connection_t *conn);
|
||||
|
@ -2407,8 +2407,8 @@ refill_callback(periodic_timer_t *timer, void *arg)
|
||||
accounting_add_bytes(bytes_read, bytes_written, seconds_rolled_over);
|
||||
|
||||
if (milliseconds_elapsed > 0) {
|
||||
connection_bucket_refill((time_t)now.tv_sec,
|
||||
monotime_coarse_get_stamp());
|
||||
connection_bucket_refill_all((time_t)now.tv_sec,
|
||||
monotime_coarse_get_stamp());
|
||||
}
|
||||
|
||||
stats_prev_global_read_bucket = token_bucket_rw_get_read(&global_bucket);
|
||||
|
Loading…
Reference in New Issue
Block a user