mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 21:51:25 -07:00
- Removed max limit for connections (not needed anymore by libtorrent)
This commit is contained in:
parent
201dddd30a
commit
6244d1226f
1 changed files with 2 additions and 12 deletions
14
src/GUI.cpp
14
src/GUI.cpp
|
@ -48,9 +48,6 @@
|
|||
#include "downloadThread.h"
|
||||
#include "downloadFromURLImp.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
/*****************************************************
|
||||
* *
|
||||
* 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue