summaryrefslogtreecommitdiff
path: root/src/RpcMethodImpl.cc
diff options
context:
space:
mode:
authoroliviercommelarbre <oliviercommelarbre@gmail.com>2016-02-11 00:04:49 +0100
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-03-16 21:22:49 +0900
commit9e05371fb6a70d7d5e9d49db31b879e79c1b56e7 (patch)
treede5e25d3a5b89c932f897e6c4905ba7b507337ec /src/RpcMethodImpl.cc
parentf0f1b8ef47c391550ff99982f1cad3dd4e1d410d (diff)
Added support for a dynamic management of the number of concurrent downloads as a function of the overall bandwidth observed
Diffstat (limited to 'src/RpcMethodImpl.cc')
-rw-r--r--src/RpcMethodImpl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/RpcMethodImpl.cc b/src/RpcMethodImpl.cc
index e8fccd62..5d6e8202 100644
--- a/src/RpcMethodImpl.cc
+++ b/src/RpcMethodImpl.cc
@@ -1592,10 +1592,14 @@ void changeGlobalOption(const Option& option, DownloadEngine* e)
option.getAsInt(PREF_MAX_OVERALL_UPLOAD_LIMIT));
}
if (option.defined(PREF_MAX_CONCURRENT_DOWNLOADS)) {
- e->getRequestGroupMan()->setMaxSimultaneousDownloads(
+ e->getRequestGroupMan()->setMaxConcurrentDownloads(
option.getAsInt(PREF_MAX_CONCURRENT_DOWNLOADS));
e->getRequestGroupMan()->requestQueueCheck();
}
+ if(option.defined(PREF_OPTIMIZE_CONCURRENT_DOWNLOADS)) {
+ e->getRequestGroupMan()->setupOptimizeConcurrentDownloads();
+ e->getRequestGroupMan()->requestQueueCheck();
+ }
if (option.defined(PREF_MAX_DOWNLOAD_RESULT)) {
e->getRequestGroupMan()->setMaxDownloadResult(
option.getAsInt(PREF_MAX_DOWNLOAD_RESULT));