From 6244d1226f3c3cea32339301a2607f0f0f29b9ce Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 30 Sep 2006 22:11:15 +0000 Subject: [PATCH] - Removed max limit for connections (not needed anymore by libtorrent) --- src/GUI.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index e810ec2b2..8bf85d017 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -48,9 +48,6 @@ #include "downloadThread.h" #include "downloadFromURLImp.h" -#include -#include - /***************************************************** * * * GUI * @@ -1421,17 +1418,10 @@ void GUI::configureSession(){ setInfoBar(tr("Listening on port: ")+ QString(misc::toString(new_listenPort).c_str())); } } - struct rlimit rlim; - getrlimit(RLIMIT_NOFILE, &rlim); - s->set_max_connections((int)rlim.rlim_max-60); // Apply max connec limit (-1 if disabled) int max_connec = options->getMaxConnec(); - if(max_connec == -1 or max_connec >= (int)rlim.rlim_max-50){ - s->set_max_connections(rlim.rlim_max-50); - }else{ - s->set_max_connections(max_connec); - } - // Apply Up/Dl limits (-1 if disabled) + s->set_max_connections(max_connec); + limits = options->getLimits(); switch(limits.first){ case -1: // Download limit disabled