cURL / Mailing Lists / curl-library / Single Mail


Re: FW: scp upload failure memory leak

From: Daniel Stenberg <>
Date: Tue, 27 May 2008 23:51:14 +0200 (CEST)

On Tue, 27 May 2008, Jeff Weber wrote:

> The new scp, sftp upload timeout test cases also pass without leaks
> with the new scp-sftp-leaks-2.patch .

Okay, so then at least it makes some things better and nothing got worse than

> However, when I break the network connection during a series of scp uploads
> that share the same connection, the CURLOPT_TIMEOUT doesn't work, and I get
> memory leaks.

That's weird. A lot of the transfer logic is the same, and the timeout logic
should be identical between SCP and SFTP...

So if CURLOPT_TIMEOUT doesn't work, how do you abort the transfer?

> In all cases, I successfully set CURLOPT_TIMEOUT to 30sec before starting
> the uploads and breaking the connection. However, when I break the
> connection during the SSH_SCP_UPLOAD_INIT state, the upload hangs for about
> 15min.

Is it the libssh2_scp_send_ex() function call that hangs then?

Received on 2008-05-27