BUG/MINOR: stconn: Handle abortonclose if backend connection was already set up

abortonclose option is a backend option, it should not be handle on frontend
side. Of course a frontend can also be a backend but the option should not
be handled too early because it is not necessarily the selected backend
(think about a listen proxy routing requests to another backend).

It is especially an issue when the abortonclose option is enabled in the
defaults section and disabled by the selected backend. Because in this case,
the option may still be enabled while it should not.

Thus, now we wait the backend connection was set up to handle the option. To
do so, we check the backend SC state. The option is ignored if it is in
ST_CS_INI state. For all other states, it means the backend was already
selected.

This patch could be backported as far as 2.2.

(cherry picked from commit 9327e7efa73b2be17cf8fbe9ab735181a84839fb)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit d24b51a6bfffa20486df49e780279bd07e4493f0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit e804c75c63df9eba39ce14d33f4f584398fa8011)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f0fef89b06fc953e7e4edaadabfc1e39748e3e7a)
[cf: changes applied on stream-interface instead of stream-connector]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed