Hi,

the default is to try 20 times with a increasing wait time inbetween
(that is documented).

Add --tries=1 and it will behave as you want.

Regards, Tim

On 10/24/18 7:12 PM, Peng Yu wrote:
> Hi,
> 
> The second command hangs forever. I am not sure what is wrong with it.
> My understanding is that if I set connect-timeout short enough, wget
> should fail. Could anybody let me know how to get this behavior? (See
> the curl output below as a reference.)
> 
> $ time wget -qO- http://httpbin.org/get
> {
>   "args": {},
>   "headers": {
>     "Accept": "*/*",
>     "Accept-Encoding": "identity",
>     "Connection": "close",
>     "Host": "httpbin.org",
>     "User-Agent": "Wget/1.19.5 (darwin17.7.0)"
>   },
>   "origin": "165.91.49.229",
>   "url": "http://httpbin.org/get";
> }
> 
> real    0m0.237s
> user    0m0.005s
> sys    0m0.006s
> $ wget --connect-timeout .0001 -qO- http://httpbin.org/get
> $ curl --connect-timeout .1 http://httpbin.org/get
> curl: (28) Connection timed out after 100 milliseconds
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to