diff options
author | Andrea Shepard <andrea@torproject.org> | 2016-06-30 10:58:17 +0000 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2016-08-20 01:43:49 +0000 |
commit | 4f253d4c676caba979ddf4bc2668273700f279ae (patch) | |
tree | 9a2c8d57d332ab5a1820e2c0c9b20914e41883f8 /src | |
parent | 34d9d02150fc41107887c27900a62c4552578789 (diff) | |
download | tor-4f253d4c676caba979ddf4bc2668273700f279ae.tar.gz tor-4f253d4c676caba979ddf4bc2668273700f279ae.zip |
Don't say OOS unless the ConnLimit thresholds have been set
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 3939531876..77ad56775c 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -4523,9 +4523,13 @@ connection_handle_oos(int n_socks, int failed) /* * Check if we're really handling an OOS condition, and if so decide how - * many sockets we want to get down to. + * many sockets we want to get down to. Be sure we check if the threshold + * is distinct from zero first; it's possible for this to be called a few + * times before we've finished reading the config. */ - if (n_socks > get_options()->ConnLimit_high_thresh) { + if (n_socks >= get_options()->ConnLimit_high_thresh && + get_options()->ConnLimit_high_thresh != 0 && + get_options()->ConnLimit_ != 0) { /* Try to get down to the low threshold */ target_n_socks = get_options()->ConnLimit_low_thresh; log_notice(LD_NET, |