summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 189a556fbe..5b31cec21d 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1292,6 +1292,8 @@ connection_bucket_refill(int seconds_elapsed)
connection_t **carray;
or_options_t *options = get_options();
+ tor_assert(seconds_elapsed >= 0);
+
/* refill the global buckets */
if (global_read_bucket < (int)options->BandwidthBurst) {
global_read_bucket += (int)options->BandwidthRate*seconds_elapsed;