]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: session: report lack of resources using the new stream-interface's error code
authorWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 16:14:23 +0000 (17:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 16:14:23 +0000 (17:14 +0100)
Let's now use SI_ET_CONN_RES to report lack of resources instead of
SO_ET_CONN_OTHER with a handcrafted code.

src/session.c

index 75ac04c77db9c35a9f9d29aadf8792af0cff9676..86dcb848420701b77b14a3a19e6711742d5f2f50 100644 (file)
@@ -1172,13 +1172,12 @@ static void sess_prepare_conn_req(struct session *s, struct stream_interface *si
                         * error code to ignore the ERR_LOCAL which is not a
                         * real error.
                         */
-                       s->flags = (s->flags & ~SN_ERR_MASK) | SN_ERR_RESOURCE;
-                       s->flags = (s->flags & ~SN_FINST_MASK) | SN_FINST_C;
+                       s->flags &= ~(SN_ERR_MASK | SN_FINST_MASK);
 
                        si_shutr(si);
                        si_shutw(si);
                        si->ob->flags |= CF_WRITE_ERROR;
-                       si->err_type = SI_ET_CONN_OTHER;
+                       si->err_type = SI_ET_CONN_RES;
                        si->state = SI_ST_CLO;
                        if (s->srv_error)
                                s->srv_error(s, si);