Fixed 'Maximum time allowed to spend' section - #655
Open
JonothorDarry wants to merge 1 commit into
Open
Conversation
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.
The statements made in "Maximum time allowed to spend" section are imprecise and out of touch with the contents of the manual (and actual practice). Firstly,
Tell curl with
-m / --max-timethe maximum time, in seconds, that you allow the command line to spend before curl exits with a timeout error code (28). When the set time has elapsed, curl exits no matter what is going on at that moment—including if it is transferring data. It really is the maximum time allowed.is incorrect - it only applies to a single transfer. Thus, running
curl -m 5 -O -O file_link_1 file_link_2may fail with an error code (28) on the first file, and succeed (0 exit code) on the second. Furthermore, the timer is reset for each retry. To add to this,
(Your locale may use another symbol than a dot for expressing numerical fractions.)
seems misleading, for the decimal value needs to be provided using a dot (.) as decimal separator. The exact wording from the current manual goes like this:
-m, --max-time <seconds>Set the maximum time in seconds that you allow each transfer to take. Prevents your batch jobs from hanging for hours due to slow networks or links going down. This option accepts decimal values.
If you enable retrying the transfer (
--retry) then the maximum time counter is reset each time the transfer is retried. You can use--retry-max-timeto limit the retry time.The decimal value needs to be provided using a dot (
.) as decimal separator - not the local version even if it might be using another separator.I also encountered another problem - BUILD.md uses multilingual = false, which appears to be deprecated:
mainmatter/100-exercises-to-learn-rust#332
and it does not build .pdf (and I didn't see anything resembling .epub either). I didn't attempt to fix it.