Quellcode durchsuchen

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

Roger Dingledine vor 20 Jahren
Ursprung
Commit
f1864dfff3
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      src/common/compat.c

+ 2 - 2
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