cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multi_runsingle referencing freed connection

From: Yang Tse <yangsita_at_gmail.com>
Date: Tue, 20 Feb 2007 16:28:45 +0100

2007/2/19, Daniel Stenberg wrote:

> On Sat, 17 Feb 2007, Jeff Pohlmeyer wrote:
>
> > And then on line 2059 of url.c
> > ====
> > if (data->state.is_in_pipeline && check->bits.close) {
> > /* Don't pick a connection that is going to be closed */
> > infof(data, "Connection #%ld has been marked for close, can't
> > reuse\n",
> > check->connectindex);
> > continue;
> > }
> > ====
> >
> > I don't don't understand the "is_in_pipeline" check here, if multi.c flagged
> > the connection as bad, then it shouldn't get re-used, regardless if it is
> > pipelined or not?
>
> Correct. It turned out this probably was written this way just because the
> HTTP connections wasn't flagged re-usable until the HTTP request was sent and
> thus for the pipelining case it couldn't add a new request to the pipe until
> the first request had been sent.
>
> This is now changed so that the re-use bit (conn->bits.close) is set to its
> default value already in the HTTP-connect function and then I could fix that
> conditional up there you found.
>
> Thanks for your keen eyes and reports. I committed both these changes
> yesterday.

Just in case no one has noticed. I think a change related with this is
the reason for tests 530 and 531 failing on Mac OS X. All other
platforms are running them OK. Something select() related ? I'm
clueless.

-- 
-=[Yang]=-
Received on 2007-02-20