]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: connections: Remove error flags when retrying.
authorOlivier Houchard <cognet@ci0.org>
Sat, 8 Dec 2018 18:08:48 +0000 (19:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 8 Dec 2018 20:56:07 +0000 (21:56 +0100)
In connect_server(), when retrying to connect, remove the error flags from
the connection and the conn_stream, we're trying to connect again, anyway.

src/backend.c

index 46e59eac592fa7d080bb7d01631e4ed924f1b09c..24fcb724767a001db561e7da89b83afcbf98ff64 100644 (file)
@@ -1130,9 +1130,11 @@ int connect_server(struct stream *s)
        srv_cs = objt_cs(s->si[1].end);
        if (srv_cs) {
                old_conn = srv_conn = cs_conn(srv_cs);
-               if (old_conn &&
-                   !(old_conn->flags & (CO_FL_ERROR | CO_FL_WAIT_L4_CONN)))
+               if (old_conn) {
+                       old_conn->flags &= ~(CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH);
+                       srv_cs->flags &= ~CS_FL_ERROR;
                        reuse = 1;
+               }
        } else {
                for (i = 0; i < MAX_SRV_LIST; i++) {
                        if (s->sess->srv_list[i].target == s->target) {