cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl loop hangs

From: Ronald Müller <ronald.mueller_at_gmail.com>
Date: Mon, 24 Oct 2011 10:49:07 +0200

Hi Dan,

thanks for your hint. Your conclusion seems to be absolutely right. Setting
a timeout using "--max-time" works.

After achieving the timeout my script returns and continues.** That helps.

Thank you very much
Ronald

2011/10/21 Dan Fandrich <dan_at_coneharvesters.com>

>
> curl won't send the GET request until it connects to the remote server. So,
> in this case it DID connect (to the allegedly unavailable port) and sent
> the
> request. At that point it will wait for the response, and since HTTP
> doesn't
> specify any timeouts, it will wait forever. If whatever it was that
> answered
> on port 11111 acts like port 9 (the discard port), then curl will never
> exit,
> by design.
>
> You will want to add a timeout or speed limit option to have curl detect
> this
> condition and eventually abort.
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-24