]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MEDIUM] http: make forceclose use SI_FL_NOLINGER
authorWilly Tarreau <w@1wt.eu>
Tue, 29 Dec 2009 13:39:48 +0000 (14:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Dec 2009 13:39:48 +0000 (14:39 +0100)
Option forceclose is not limited to the shortage of source ports
anymore thanks to this flag.

src/proto_http.c

index a5de8804d1141973ec4aaa9d93814fbd024d0bfd..3a5f14100a6d21d6598c1f9fa531457e3a50e215 100644 (file)
@@ -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);
                        }