8ecc3bf
--- libtransmission/fdlimit.c.orig	2018-01-10 20:21:41.933611849 +0100
8ecc3bf
+++ libtransmission/fdlimit.c	2018-01-10 20:22:02.367013913 +0100
8ecc3bf
@@ -365,22 +365,6 @@
8ecc3bf
       fileset_construct (&i->fileset, FILE_CACHE_SIZE);
8ecc3bf
       session->fdInfo = i;
8ecc3bf
 
8ecc3bf
-#ifndef _WIN32
8ecc3bf
-      /* set the open-file limit to the largest safe size wrt FD_SETSIZE */
8ecc3bf
-      struct rlimit limit;
8ecc3bf
-      if (!getrlimit (RLIMIT_NOFILE, &limit))
8ecc3bf
-        {
8ecc3bf
-          const int old_limit = (int) limit.rlim_cur;
8ecc3bf
-          const int new_limit = MIN (limit.rlim_max, FD_SETSIZE);
8ecc3bf
-          if (new_limit != old_limit)
8ecc3bf
-            {
8ecc3bf
-              limit.rlim_cur = new_limit;
8ecc3bf
-              setrlimit (RLIMIT_NOFILE, &limit);
8ecc3bf
-              getrlimit (RLIMIT_NOFILE, &limit);
8ecc3bf
-              tr_logAddInfo ("Changed open file limit from %d to %d", old_limit, (int)limit.rlim_cur);
8ecc3bf
-            }
8ecc3bf
-        }
8ecc3bf
-#endif
8ecc3bf
     }
8ecc3bf
 }
8ecc3bf