]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: stream-int: make idle-conns switch to ST_RDY
authorWilly Tarreau <w@1wt.eu>
Thu, 6 Jun 2019 07:17:15 +0000 (09:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Jun 2019 14:36:19 +0000 (16:36 +0200)
The purpose of making idle-conns switch to SI_ST_CON was to make the
transition detectable and the operation retryable in case of connection
error. Now we have the RDY state for this which is much more suitable
since it indicates a validated connection on which we didn't necessarily
send anything yet. This will still lead to a transition to EST while not
requiring unnatural write polling nor connect timeouts.

include/proto/stream_interface.h

index 17a0c7461659a43c83d5f5b5147a7fc90c8b0cdc..46df1bdb432973971865a75ffb29d9d26bc3f94d 100644 (file)
@@ -519,7 +519,7 @@ static inline int si_connect(struct stream_interface *si, struct connection *con
                /* try to reuse the existing connection, it will be
                 * confirmed once we can send on it.
                 */
-               si->state = SI_ST_CON;
+               si->state = SI_ST_RDY;
        }
 
        /* needs src ip/port for logging */