aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-01-23 23:39:13 +0000
committerRoger Dingledine <arma@torproject.org>2006-01-23 23:39:13 +0000
commitf1864dfff351773b7268e095a41e4b8c2c919b8a (patch)
tree7a4c3cfb1b76e0a69d3ded9d13e84434e18f1719 /src/common/compat.c
parent5521b5de3ee5f505ae07e6e129e1d4a87a87d198 (diff)
downloadtor-f1864dfff351773b7268e095a41e4b8c2c919b8a.tar
tor-f1864dfff351773b7268e095a41e4b8c2c919b8a.tar.gz
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/common/compat.c')
-rw-r--r--src/common/compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 281b8ae6f..689c7eaed 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