1 From d45840bd28f5cf604d320ab9ff308ba7ba8c0b28 Mon Sep 17 00:00:00 2001
2 From: Willy Tarreau <w@1wt.eu>
3 Date: Fri, 21 Jun 2013 08:20:19 +0200
4 Subject: [PATCH 3/9] MEDIUM: session: disable lingering on the server when the
7 When abortonclose is used and an error is detected on the client side,
8 better force an RST to the server. That way we propagate to the server
9 the same vision we got from the client, and we ensure that we won't keep
12 (cherry picked from commit 8615c2af67dc2be07bdb246ed13130fe7d32e3d1)
14 src/session.c | 5 ++++-
15 1 file changed, 4 insertions(+), 1 deletion(-)
17 diff --git a/src/session.c b/src/session.c
18 index 21ecb9f..9ed932c 100644
21 @@ -1370,8 +1370,11 @@ resync_stream_interface:
22 buffer_shutw_now(s->req);
24 /* shutdown(write) pending */
25 - if (unlikely((s->req->flags & (BF_SHUTW|BF_SHUTW_NOW|BF_OUT_EMPTY)) == (BF_SHUTW_NOW|BF_OUT_EMPTY)))
26 + if (unlikely((s->req->flags & (BF_SHUTW|BF_SHUTW_NOW|BF_OUT_EMPTY)) == (BF_SHUTW_NOW|BF_OUT_EMPTY))) {
27 + if (s->req->flags & BF_READ_ERROR)
28 + s->req->cons->flags |= SI_FL_NOLINGER;
29 s->req->cons->shutw(s->req->cons);
32 /* shutdown(write) done on server side, we must stop the client too */
33 if (unlikely((s->req->flags & (BF_SHUTW|BF_SHUTR|BF_SHUTR_NOW)) == BF_SHUTW &&