不知道怎么--retry-max-time
计算的。如果我下载文件file.txt
:
curl --max-time 10 --retry 3 --retry-delay 5 --retry-max-time 32 'http://www.site.com/download/file.txt'
[ 0- 2]
它需要2s
下载50%
文件,并且不再有速度。[ 2-10]
它等待另一个8s
,仍然没有速度,超时,将重试[10-15]
在重试之前等待5s
#1[15-25]
仍然没有速度,将重试[25-30]
在重试之前等待5s
#2[30-34]
它需要4s
下载33%
文件,并且不再有速度。[34-40]
它等待另一个6s
,仍然没有速度,超时
此时会curl
停止重试(40s
)吗?
什么时候retry timer
开始和停止?
--retry-max-time <seconds>
The retry timer is reset before the first transfer attempt. Retries will be done as usual (see --retry) as
long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the
request will be made and while performing, it may take longer than this given time period. To limit a single
request´s maximum time, use -m, --max-time. Set this option to zero to not timeout retries. (Added in
7.12.3)