summaryrefslogtreecommitdiff
path: root/src/TimerA2.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-17 21:19:45 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-17 21:19:45 +0900
commitf2a63fa06a931333ac2e4a3a5d36a56418b4b6cd (patch)
tree1a9114f36cdb32cfd5e0272b672f0c8d5b420cde /src/TimerA2.cc
parent4824b09237e049ac7d912cdaa4a8a041eedd5dab (diff)
Added --retry-wait option.
This option was once existed in aria2 but erased on 2009-09-20. Now it is resurrected once again. We choose 2 as default value, but there is no good theory behind it. Now we retry HTTP download when remote server returns 503 Service Unavailable if --retry-wait > 0. We also added error code 29: HTTP_SERVICE_UNAVAILABLE.
Diffstat (limited to 'src/TimerA2.cc')
-rw-r--r--src/TimerA2.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/TimerA2.cc b/src/TimerA2.cc
index 973c830e..3ed6b564 100644
--- a/src/TimerA2.cc
+++ b/src/TimerA2.cc
@@ -75,6 +75,11 @@ bool Timer::operator<(const Timer& timer) const
return util::difftv(timer.tv_, tv_) > 0;
}
+bool Timer::operator<=(const Timer& timer) const
+{
+ return util::difftv(timer.tv_, tv_) >= 0;
+}
+
bool Timer::operator>(const Timer& timer) const
{
return util::difftv(tv_, timer.tv_) > 0;