summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2010-08-15 04:01:42 -0400
committerRoger Dingledine <arma@torproject.org>2010-08-15 04:01:42 -0400
commit8d588e7b1a4fccffaa8318ed14d00a2ef615c53a (patch)
tree2c9580ada20875112cca1b120ade06d1f5a498fd /src/or/config.c
parent2bc1842aaac1119a840b8ed3fa815c6f71053ac7 (diff)
downloadtor-8d588e7b1a4fccffaa8318ed14d00a2ef615c53a.tar.gz
tor-8d588e7b1a4fccffaa8318ed14d00a2ef615c53a.zip
reinit per-conn token buckets on config or consensus change
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 58cf2ff2d3..ef2b2ddeab 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -17,6 +17,7 @@
#include "config.h"
#include "connection.h"
#include "connection_edge.h"
+#include "connection_or.h"
#include "control.h"
#include "cpuworker.h"
#include "dirserv.h"
@@ -1292,6 +1293,10 @@ options_act(or_options_t *old_options)
if (options->V3AuthoritativeDir && !old_options->V3AuthoritativeDir)
init_keys();
+
+ if (options->PerConnBWRate != old_options->PerConnBWRate ||
+ options->PerConnBWBurst != old_options->PerConnBWBurst)
+ connection_or_update_token_buckets(get_connection_array(), options);
}
/* Maybe load geoip file */