In connect_server(), don't attempt to reuse the conn_stream associated to
the stream_interface, if we already attempted a connection with it.
Using that conn_stream is only there for the cases where a connection and
a conn_stream was created ahead, mostly by http_proxy or by the LUA code.
If we already attempted to connect, that means we fail, and so we should
create a new connection.
No backport needed.
srv_cs = objt_cs(s->si[1].end);
if (srv_cs) {
old_conn = srv_conn = cs_conn(srv_cs);
- if (old_conn)
+ if (old_conn &&
+ !(old_conn->flags & (CO_FL_ERROR | CO_FL_WAIT_L4_CONN)))
reuse = 1;
} else {
for (i = 0; i < MAX_SRV_LIST; i++) {