cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Which timeout expired? CURLOPT_TIMEOUT or CURLOPT_CONNECTTIMEOUT?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 15 Feb 2011 09:33:04 +0100 (CET)

On Tue, 15 Feb 2011, Mykyta Dorokhin wrote:

> >CURLE_OPERATION_TIMEDOUT => CURLOPT_TIMEOUT
> >CURLE_COULDNT_CONNECT => CURLOPT_CONNECTTIMEOUT
>
> Not always. In most cases I see CURLE_OPERATION_TEMEOUTD in both
> cases (HTTPs GET/POST messages).

Right. There are internal timeouts as well as externally set timouts so when a
timeout of any sort is triggered internally, libcurl tries to return the
correct return code. It makes no distinction to what timeout that was
triggered but it may return different values depending on the exact situation
when it timed out.

Like if the timeout is met while trying to connect, it may still return
CURLE_COULDNT_CONNECT.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-15