summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-10 13:40:34 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-13 10:41:14 -0400
commit6be994fa717cf73e9cfcb63f49f2d335f2d39bb9 (patch)
treeb9e5329653b69a65e6dd9cc291b0606f91cd1e76 /src/or/config.c
parenta38fd9bc5bf508d029ff2557311caeb487638968 (diff)
downloadtor-6be994fa717cf73e9cfcb63f49f2d335f2d39bb9.tar.gz
tor-6be994fa717cf73e9cfcb63f49f2d335f2d39bb9.zip
Ensure that global buckets are updated on configuration change
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 71f8528b67..c62441948f 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2219,6 +2219,12 @@ options_act(const or_options_t *old_options)
options->PerConnBWBurst != old_options->PerConnBWBurst)
connection_or_update_token_buckets(get_connection_array(), options);
+ if (options->BandwidthRate != old_options->BandwidthRate ||
+ options->BandwidthBurst != old_options->BandwidthBurst ||
+ options->BandwidthRate != old_options->BandwidthRate ||
+ options->RelayBandwidthBurst != old_options->RelayBandwidthBurst)
+ connection_bucket_adjust(options);
+
if (options->MainloopStats != old_options->MainloopStats) {
reset_main_loop_counters();
}