diff options
author | Roger Dingledine <arma@torproject.org> | 2006-01-23 23:39:13 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-01-23 23:39:13 +0000 |
commit | f1864dfff351773b7268e095a41e4b8c2c919b8a (patch) | |
tree | 7a4c3cfb1b76e0a69d3ded9d13e84434e18f1719 /src | |
parent | 5521b5de3ee5f505ae07e6e129e1d4a87a87d198 (diff) | |
download | tor-f1864dfff351773b7268e095a41e4b8c2c919b8a.tar.gz tor-f1864dfff351773b7268e095a41e4b8c2c919b8a.zip |
On systems that don't have getrlimit (like windows), we were artificially
constraining ourselves to a max of 1024 connections. Now if there is no
getrlimit, just assume that we can handle the whole 15000 connections.
The better answer is to find a getrlimit equivalent on Windows, but hey,
one step at a time.
svn:r5854
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 281b8ae6f0..689c7eaed4 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -450,8 +450,8 @@ set_max_file_descriptors(unsigned long limit, unsigned long cap) #ifndef HAVE_GETRLIMIT log_fn(LOG_INFO, LD_NET, "This platform is missing getrlimit(). Proceeding."); - if (limit > cap) { - log(LOG_INFO, LD_CONFIG, "ConnLimit must be at most %d. Capping it.", cap); + if (limit < cap) { + log(LOG_INFO, LD_CONFIG, "ConnLimit must be at most %d. Using that.", cap); limit = cap; } #else |