cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Bug in sftp timeout detection.

From: Skrzyniarz Alexandre <alexandre.skrzyniarz_at_fr.thalesgroup.com>
Date: Thu, 6 Jan 2011 09:37:25 +0100

On Wed, 5 Jan 2011 14:15:46 +0100 (CET)
Daniel Stenberg <daniel_at_haxx.se> wrote:

> Thanks for your work on this and your patch that tries to address it.
>
> However, this patch is wrong in at least two accounts:
>
> First, it doesn't actually fix the problem with -y and -Y, as then
> you'd instead make sure you call the necessary functions to evaluate
> the condition and only if met it should break the loop.
>
> Secondly, you can't have the loop blindly aborted like that as the
> disconnect state must be allowed to take a while to finish (at least
> several seconds). I figure we should rather introduce some kind of
> timeout for some of the states so that if a single transient state
> remains for a certain time we assume something wrong happened and we
> bail out.
>
> Your details and work did however push me in the right direction I
> believe and I think the attached patch is what will make -y/-Y to
> start working again for this particular case. Please try it out and
> tell me how it works, I didn't really test it myself yet.

It works with my simple tests (pull out the cable during a file
download).

>
> Although we should still have a way to bail out from "locked" states
> such as this one so that the -y/-Y work-around won't be necessary to
> trap this situation.
>
> Are you interested in working on a "real" fix for this?
>

Yes.

But as I have only a very superficial knowledge of curl library
architecture and philosophy, and few time left for this task, it may
take some time.

-- 
Alexandre SKRZYNIARZ, PhD.
[EXPERTS] Domain Design Authority, Radar & Warfare Systems.
THALES AIRBORNE SYSTEMS
10 Av 1ere DFL, 29200 BREST, France
email: alexandre.skrzyniarz_at_fr.thalesgroup.com
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-06