Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce default connection time to 10s (from 32s)
This helps to address docker/cli#1739, where an invalid `DOCKER_HOST` setting could result in a 64s delay (that's twice the delay here because the client was trying to hit the `/_ping` endpoint twice, which was addressed in moby/moby#39206) I made a previous attempt to fix this purely on the Docker cli side (docker/cli#1872) however that had the side effect of adding the timeout across the board and not just for the dial phase, which caused a regression for `docker logs -f` (docker/cli#1892) and so was reverted (docker/cli#1893). The new value of 10s is just based on a gut feeling, no initial connection should be taking that long in the real world unless something about the network link is pretty broken (e.g. bad dns perhaps), in which case affected users are surely pretty used to retrying things, better to fail faster in the normal case. Also drop the comment since the linked issue just shows that the original number, just like the new number, was arrived at fairly arbitrarily based on gut feelings (rather than anything empirical) so the reference is not really terribly useful. Signed-off-by: Ian Campbell <[email protected]>