docs: clarify retry-max-time timing check and sleep behavior#21411
Closed
dioput12 wants to merge 1 commit into
Closed
docs: clarify retry-max-time timing check and sleep behavior#21411dioput12 wants to merge 1 commit into
dioput12 wants to merge 1 commit into
Conversation
Contributor
Author
|
My testing script: #!/usr/bin/env bash
# retry-max-time regression notes for example.invalid
# Run from a shell with curl in PATH.
TARGET="http://example.invalid"
echo "== Baseline: retry-max-time 5 =="
time curl -v \
--retry 3 \
--retry-delay 2 \
--retry-max-time 5 \
--connect-timeout 2 \
"$TARGET"
echo
echo "== retry-max-time 3 (expect fewer retries than 5s case) =="
time curl -v \
--retry 3 \
--retry-delay 2 \
--retry-max-time 3 \
--connect-timeout 2 \
"$TARGET"
echo
echo "== retry-max-time 1 (only initial attempt + at most one retry) =="
time curl -v \
--retry 3 \
--retry-delay 2 \
--retry-max-time 1 \
--connect-timeout 2 \
"$TARGET"
echo
echo "== retry-max-time 10 with max-time 4 (per-attempt limit) =="
time curl -v \
--retry 3 \
--retry-delay 2 \
--retry-max-time 10 \
--max-time 4 \
"$TARGET" |
bagder
approved these changes
Apr 22, 2026
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change clarifies the documentation for
--retry-max-timewhen used together with--retryand--retry-delay.The existing text already states that retries continue “as long as the timer has not reached this given limit”, but it does not explicitly mention that the retry timer includes the sleep time between retries (for example due to
--retry-delay) and that the limit is checked before starting each new retry.The new paragraphs make this behavior explicit and also restate that transfers which have already started are allowed to complete even if this makes the total wall clock time exceed the limit, with
--max-timeavailable to cap the duration of each individual transfer attempt.