cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: debugging a crash in Curl_pgrsTime/checkPendPipeline?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 7 Aug 2009 00:40:40 +0200 (CEST)

On Thu, 6 Aug 2009, johansen_at_sun.com wrote:

I'm sorry I haven't commented on your previous mail yet, things have been very
busy in my end lately.

> It looks like when the re-connect happens the client never bothers to set
> the file pointer back to the head of the file. In fact, it appears that
> there really isn't any code in libcurl that is set up to do this.

That's because libcurl can't seek in any file, since it is given to the lib by
a callback! There is however a CURLOPT_SEEKFUNCTION that translates into a
conn->seek_func() that should be able to do the job. Hopefully. ;-)

> Is it possible to nuke the portion of Curl_do that attempts reconnects
> entirely, or is it serving some other purpose? It looks like it's just
> causing bugs for users of the pipeline'd multi-interface.

Quite possibly it should not be attempted while in a pipeline.

The code is there for the case when a connection is re-used and the
SocketIsDead() thinks the connection is fine, but as soon as anything is
attempted to get done (sent) on the socket it dies. Then that logic sets up a
new connection again and moves on from there. We should be able to detect when
that situation might happen compared to the pipelining scenario you have.

-- 
  / daniel.haxx.se
Received on 2009-08-07