cURL / Mailing Lists / curl-library / Single Mail


Re: How to close established by libcurl FTP connections

From: Daniel Stenberg <>
Date: Mon, 6 Aug 2007 15:28:03 +0200 (CEST)

On Mon, 6 Aug 2007, Robert Iakobashvili wrote:

> When both FRESH_CONNECT and FORBID_REUSE have been set the behavior of a
> cycling FTP-handle, making FTP downloads and sleeping for several seconds in
> between, was a half way to the desired, namely:
> 1) an established control FTP-connection was closed immediately just after a
> file transfer is accomplished;
> 2) an established data FTP-connection was not closed after transfer, and was
> kept during sleeping time; the connection was closed only after a new data
> connection opened by a new transfer cycle;

What? Curl_ftp_done() is called after an FTP transfer has completed and it
cloes the data connection unconditionally. How can it keep the data connection
alive? It doesn't make any sense to do that either since data connections
can't be re-used anyway.

  Commercial curl and libcurl Technical Support:
Received on 2007-08-06