cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: CURL loops infinitely when cable is pulled out.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 21 Apr 2007 23:36:54 +0200 (CEST)

On Fri, 20 Apr 2007, Sonia Subramanian wrote:

> I guess my question is "Is a select value of 0 possible under normal
> operation or would that always indicate a bad socket. Would it be safe
> to treat select_res = 0 as a socket error and break out of the loop?"

(please trim your quotes)

select() is *very* likely to return 0 under normal operations. Just get a file
from a slow/loaded site and you'll see.

CURLOPT_LOW_SPEED_TIME and CURLOPT_LOW_SPEED_LIMIT might be what you're
looking for...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-04-21