cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Connection resuability after CURLE_WRITE_ERROR

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 18 Jan 2007 23:05:37 +0100 (CET)

On Wed, 17 Jan 2007, vlad wrote:

> Callback function (CURLOPT_WRITEFUNCTION) used in my application may fail to
> receive data in some situations. In that case libcurl closes the second
> socket and leaves the connection alive. That's ok. But libcurl does not read
> any ftp response in that case. That's why when reusing connection it reads
> _old_ ftp response and fails. In my case libcurl sends PASV command but
> receives 450 result and responds about wrong reply to PASV command.

I just now tried your example with the CVS version, and I can't repeat your
problem. It closes the connection after the failure!

As you can see in lib/ftp.c:Curl_ftp_done() there are only a few selected
errors that will make the control connection remain alive, most of them will
cause it to get closed.

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