cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Unnecessary delay downloading multiple files (via SFTP)?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 17 Feb 2009 19:36:11 +0100 (CET)

On Tue, 17 Feb 2009, Patrik Thunström wrote:

> I'm currently using the latest stable releases of the libraries, meaning
> libcurl 7.19.3, Libssh2 1.0 and also OpenSSL 0.9.8j.

Goodie.

> Yes, and as I also mentioned the value of the constant timeout does not seem
> to effect the execution, besides how long the delay is in between transfers.
> Could it just be that there is action on the sockets just as libcurl is
> about to issue the call where it performs the wait, or is this a atomic
> operation where libcurl does the evaluation of the socket state and starts
> its wait before anything can happen on the sockets?

Nope. The select() or poll() that is called is level-trigged and not
edge-trigged so if the situation remains it would return.

I think the problem is more related to libssh2 internals and perhaps it
somehow returns EAGAIN for something that it shouldn't and when called again
it can comsume already buffered data even though nothing happened on the
socket, or similar. Did you try enabling libssh2 debug/trace details yet?

Can you provide a small but working source code example showing this wait?

-- 
  / daniel.haxx.se
Received on 2009-02-17