Aria2: I want to try to reconnect when aria2 drops the connection because of the lowest-speed-limit.

Created on 1 May 2017  路  3Comments  路  Source: aria2/aria2

I want to try to reconnect when aria2 drops the connection because of the lowest-speed-limit.
In the current case, when the connection is dropped because of the lowest-speed-limit option, the number of connections will be reduced to 0, and then the download task fails. I think that retrying the connection in this case can be better than the task failure. Connection slows down, or slow connections due to network problems.
Or have this feature is only I did not notice the configuration options or version.

Most helpful comment

This patch might help.

diff --git a/src/DownloadCommand.cc b/src/DownloadCommand.cc
index 91042ef..f777dec 100644
--- a/src/DownloadCommand.cc
+++ b/src/DownloadCommand.cc
@@ -306,7 +306,7 @@ void DownloadCommand::checkLowestDownloadSpeed() const
           startupIdleTime_) {
     int nowSpeed = peerStat_->calculateDownloadSpeed();
     if (nowSpeed <= lowestDownloadSpeedLimit_) {
-      throw DL_ABORT_EX2(fmt(EX_TOO_SLOW_DOWNLOAD_SPEED, nowSpeed,
+      throw DL_RETRY_EX2(fmt(EX_TOO_SLOW_DOWNLOAD_SPEED, nowSpeed,
                              lowestDownloadSpeedLimit_,
                              getRequest()->getHost().c_str()),
                          error_code::TOO_SLOW_DOWNLOAD_SPEED);

All 3 comments

This patch might help.

diff --git a/src/DownloadCommand.cc b/src/DownloadCommand.cc
index 91042ef..f777dec 100644
--- a/src/DownloadCommand.cc
+++ b/src/DownloadCommand.cc
@@ -306,7 +306,7 @@ void DownloadCommand::checkLowestDownloadSpeed() const
           startupIdleTime_) {
     int nowSpeed = peerStat_->calculateDownloadSpeed();
     if (nowSpeed <= lowestDownloadSpeedLimit_) {
-      throw DL_ABORT_EX2(fmt(EX_TOO_SLOW_DOWNLOAD_SPEED, nowSpeed,
+      throw DL_RETRY_EX2(fmt(EX_TOO_SLOW_DOWNLOAD_SPEED, nowSpeed,
                              lowestDownloadSpeedLimit_,
                              getRequest()->getHost().c_str()),
                          error_code::TOO_SLOW_DOWNLOAD_SPEED);

This would be cool!

Any update on getting this merged?

Was this page helpful?
0 / 5 - 0 ratings