cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl hang while receiving data

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 17 Jan 2006 09:20:34 +0100 (CET)

On Tue, 17 Jan 2006, Mohd Idzuan wrote:

> I have develop a file downloader using cURL on vb6. The application, can
> also resume file download if previously pause or stop. My problem is, if
> connection is poor in the middle of file transfer, cURL will seem to hang
> and sometimes crashes my vb6 apps. How can i solve this problem? Currently,
> i am using curl_easy method, to initiate the file download.

It doesn't "hang". It sits there waiting for more data to arrive, as that's
what it is designed to do. You can opt to stop the transfer with a timeout, a
low-speed setting or by returning an error from a progress callback. It really
is up to how you want to handle the situation. An "idle" TCP connection is not
an error, it is a situation that happens from time to time.

It really shouldn't cause any crash and I fail to see how libcurl can do that
by simply taking a long time before returning.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-01-17