summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-09-26 22:07:35 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-09-26 22:07:35 +0900
commitae78d7f7d06404c10fb58dcbce4180075fbae45a (patch)
treefaff47572478d0512ca1c4b74a0d4f32f39039c8
parente31f537ac51f679da91cd79e2f8c933fa21bcb7c (diff)
Enable --keep-unfinished-download-result by default
-rw-r--r--doc/manual-src/en/aria2c.rst9
-rw-r--r--src/OptionHandlerFactory.cc2
-rw-r--r--src/usage_text.h11
3 files changed, 13 insertions, 9 deletions
diff --git a/doc/manual-src/en/aria2c.rst b/doc/manual-src/en/aria2c.rst
index ef709e20..37d01a9b 100644
--- a/doc/manual-src/en/aria2c.rst
+++ b/doc/manual-src/en/aria2c.rst
@@ -1398,8 +1398,7 @@ Advanced Options
downloads must be saved in session file (see
:option:`--save-session` option). Please keep in mind that there is
no upper bound to the number of unfinished download result to keep.
- User should use this option only when they know the total number of
- downloads in advance. Default: ``false``
+ If that is undesirable, turn this option off. Default: ``true``
.. option:: --max-download-result=<NUM>
@@ -1410,8 +1409,10 @@ Advanced Options
oldest download result is removed from the front of the queue and
new one is pushed to the back. Setting big number in this option may
result high memory consumption after thousands of
- downloads. Specifying 0 means no download result is kept. Default:
- ``1000``
+ downloads. Specifying 0 means no download result is kept. Note that
+ unfinished downloads are kept in memory regardless of this option
+ value. See :option:`--keep-unfinished-download-result` option.
+ Default: ``1000``
.. option:: --max-mmap-limit=<SIZE>
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index e718382b..77fd61e3 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -407,7 +407,7 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
OptionHandler* op(
new BooleanOptionHandler(PREF_KEEP_UNFINISHED_DOWNLOAD_RESULT,
TEXT_KEEP_UNFINISHED_DOWNLOAD_RESULT,
- A2_V_FALSE, OptionHandler::OPT_ARG));
+ A2_V_TRUE, OptionHandler::OPT_ARG));
op->addTag(TAG_ADVANCED);
op->setChangeGlobalOption(true);
handlers.push_back(op);
diff --git a/src/usage_text.h b/src/usage_text.h
index a9240732..3bd835eb 100644
--- a/src/usage_text.h
+++ b/src/usage_text.h
@@ -795,7 +795,10 @@
" is pushed to the back. Setting big number in this\n" \
" option may result high memory consumption after\n" \
" thousands of downloads. Specifying 0 means no\n" \
- " download result is kept.")
+ " download result is kept. Note that unfinished\n" \
+ " downloads are kept in memory regardless of this\n" \
+ " option value. See\n" \
+ " --keep-unfinished-download-result option.")
#define TEXT_ASYNC_DNS_SERVER \
_(" --async-dns-server=IPADDRESS[,...] Comma separated list of DNS server address\n" \
" used in asynchronous DNS resolver. Usually\n" \
@@ -1106,7 +1109,7 @@
" if all unfinished downloads must be saved in\n" \
" session file (see --save-session option). Please\n" \
" keep in mind that there is no upper bound to the\n" \
- " number of unfinished download result to keep.\n" \
- " User should use this option only when they know\n" \
- " the total number of downloads in advance.")
+ " number of unfinished download result to keep. If\n" \
+ " that is undesirable, turn this option off.")
+
// clang-format on