curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: libcurl ignore timeout on sftp disconnect

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 22 May 2020 23:37:21 +0200 (CEST)

On Wed, 20 May 2020, Estanislau Aug-Pujadas via curl-library wrote:

> I have been using curl to upload files with sftp, and I have encountered an
> unexpected behaviour related to timeouts and disconnects. When setting
> CURLOPT_TIMEOUT_MS to some value, and the network disconnects during a file
> upload, libcurl does not timeout the operation.
>
> I found a commit on Github that indicates that this behaviour is actually
> intentional to address a problem that could leak to memory leaks for libssh2
> https://github.com/curl/curl/commit/f31760e63b4e9ef1eb25f8f211390f8239388515

Yeah, when I'm looking at it now it seems like the wrong fix (that I made and
pushed). If libssh2 does indeed leak that memory, the fix should be done in
libssh2. We should not just ignore a timeout request from a user.

If you revert that change, does the timeout work properly? Does libssh2
(still) leak memory if you do?

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-22