mirror of https://github.com/aria2/aria2
--max-connection-per-server option is now available in aria2.changeOption.
--max-connection-per-server option is now available in aria2.changeOption if a download is waiting/paused in queue.pull/2/head
parent
9e2624a265
commit
57b37db8a1
|
@ -436,6 +436,7 @@ OptionHandlerFactory::createOptionHandlers()
|
|||
op->addTag(TAG_HTTP);
|
||||
op->setInitialOption(true);
|
||||
op->setChangeGlobalOption(true);
|
||||
op->setChangeOptionForReserved(true);
|
||||
handlers.push_back(op);
|
||||
}
|
||||
{
|
||||
|
|
|
@ -1137,6 +1137,14 @@ void changeOption
|
|||
if(option.defined(PREF_SPLIT)) {
|
||||
group->setNumConcurrentCommand(option.getAsInt(PREF_SPLIT));
|
||||
}
|
||||
if(option.defined(PREF_MAX_CONNECTION_PER_SERVER)) {
|
||||
int maxConn = option.getAsInt(PREF_MAX_CONNECTION_PER_SERVER);
|
||||
const std::vector<SharedHandle<FileEntry> >& files = dctx->getFileEntries();
|
||||
for(std::vector<SharedHandle<FileEntry> >::const_iterator i = files.begin(),
|
||||
eoi = files.end(); i != eoi; ++i) {
|
||||
(*i)->setMaxConnectionPerServer(maxConn);
|
||||
}
|
||||
}
|
||||
if(option.defined(PREF_MAX_DOWNLOAD_LIMIT)) {
|
||||
group->setMaxDownloadSpeedLimit
|
||||
(option.getAsInt(PREF_MAX_DOWNLOAD_LIMIT));
|
||||
|
|
Loading…
Reference in New Issue