From 8c603ded394ac4485874ad4e56cb989673943484 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 6 Jun 2019 09:17:15 +0200 Subject: [PATCH] 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. --- include/proto/stream_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.47.3