From: Willy Tarreau Date: Tue, 29 Dec 2009 13:39:48 +0000 (+0100) Subject: [MEDIUM] http: make forceclose use SI_FL_NOLINGER X-Git-Tag: v1.4-dev5~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9438c718ce08f11712c6373f8766dba054d2914e;p=thirdparty%2Fhaproxy.git [MEDIUM] http: make forceclose use SI_FL_NOLINGER Option forceclose is not limited to the shortage of source ports anymore thanks to this flag. --- diff --git a/src/proto_http.c b/src/proto_http.c index a5de8804d1..3a5f14100a 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3318,7 +3318,12 @@ int http_request_forward_body(struct session *s, struct buffer *req, int an_bit) */ if ((s->fe->options | s->be->options) & PR_O_FORCE_CLO) { - /* option forceclose is set, let's enforce it now that the transfer is complete. */ + /* Option forceclose is set, let's enforce it now + * that the transfer is complete. We can safely speed + * up the close because we know the server has received + * everything we wanted it to receive. + */ + req->cons->flags |= SI_FL_NOLINGER; buffer_abort(req); }