diff --git a/src/or/connection.c b/src/or/connection.c index 1e308e9b4f..631d665af4 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -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(); diff --git a/src/or/connection.h b/src/or/connection.h index 83e2bd5438..a2dce2435f 100644 --- a/src/or/connection.h +++ b/src/or/connection.h @@ -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); diff --git a/src/or/main.c b/src/or/main.c index e21ef24f8e..3217e2d9be 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -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);