From: Willy Tarreau Date: Sun, 8 Mar 2009 18:44:29 +0000 (+0100) Subject: [CLEANUP] don't enable kernel splicing when socket is closed X-Git-Tag: v1.3.16-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed066fae25d20ebaa6f83adc73cae44e39e49d12;p=thirdparty%2Fhaproxy.git [CLEANUP] don't enable kernel splicing when socket is closed Splicing will not be used when the source socket is closed. Don't enable it uselessly. --- diff --git a/src/session.c b/src/session.c index aa29591cbe..b3707d0434 100644 --- a/src/session.c +++ b/src/session.c @@ -771,7 +771,7 @@ resync_stream_interface: if (!s->req->send_max && s->req->prod->state >= SI_ST_EST && !s->req->analysers && !(s->req->flags & BF_HIJACK)) { /* check if it is wise to enable kernel splicing on the request buffer */ - if (!(s->req->flags & BF_KERN_SPLICING) && + if (!(s->req->flags & (BF_KERN_SPLICING|BF_SHUTR)) && (global.tune.options & GTUNE_USE_SPLICE) && (pipes_used < global.maxpipes) && (((s->fe->options2|s->be->options2) & PR_O2_SPLIC_REQ) || @@ -905,7 +905,7 @@ resync_stream_interface: if (!s->rep->send_max && s->rep->prod->state >= SI_ST_EST && !s->rep->analysers && !(s->rep->flags & BF_HIJACK)) { /* check if it is wise to enable kernel splicing on the response buffer */ - if (!(s->rep->flags & BF_KERN_SPLICING) && + if (!(s->rep->flags & (BF_KERN_SPLICING|BF_SHUTR)) && (global.tune.options & GTUNE_USE_SPLICE) && (pipes_used < global.maxpipes) && (((s->fe->options2|s->be->options2) & PR_O2_SPLIC_RTR) ||