On Wed, Jun 15, 2011 at 10:03:17PM +0200, Willy Tarreau wrote:
> On Wed, Jun 15, 2011 at 05:01:32PM +0900, Simon Horman wrote:
> > On Wed, Jun 08, 2011 at 10:55:44AM +0200, Willy Tarreau wrote:
> >
> > [snip]
> >
> > > Not necessarily : currently, if you only close on the server side, the
> > > effect will be propagated to the client side, so it already does the right
> > > thing and at the same time will allow us to improve on this later.
> >
> > Hi Willy,
> >
> > I am a little confused about how to shut down sessions on the server side.
> >
> > Currently I have:
> >
> > if (session->srv_conn == srv &&
> > !(session->rep->flags & (BF_SHUTW|BF_SHUTW_NOW))) {
> > buffer_shutr_now(session->rep);
> > buffer_shutw_now(session->rep);
> > ...
> > }
> >
> > Is your suggestion to change rep to req? I did try that initially
> > without success. I assume that I am missing something.
>
> No, the idea is that we want to shut the write side of the request and
> the read side of the response in order to close everything connected
> to the server. Doing so should be enough :
>
> buffer_shutw_now(session->req);
> buffer_shutr_now(session->rep);
Thanks, got it.