From: Willy Tarreau Date: Thu, 6 Jun 2019 07:17:15 +0000 (+0200) Subject: MEDIUM: stream-int: make idle-conns switch to ST_RDY X-Git-Tag: v2.0-dev6~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c603ded394ac4485874ad4e56cb989673943484;p=thirdparty%2Fhaproxy.git MEDIUM: stream-int: make idle-conns switch to ST_RDY 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. --- diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h index 17a0c74616..46df1bdb43 100644 --- a/include/proto/stream_interface.h +++ b/include/proto/stream_interface.h @@ -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 */