mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-26 15:40:32 +00:00
BUG/MEDIUM: servers: Don't check if we have a conn_stream too soon.
The creation of the conn_stream for an outgoing connection has been delayed a bit, and when using dispatch, a check was made to see if a conn_stream was attached before the conn_stream was created, so remove the test, as it's done later anyway, and create and install the conn_stream right away when we don't have a server, as is done when we don't have an alpn/npn defined.
This commit is contained in:
parent
c6e0bb4944
commit
1295016873
@ -1253,15 +1253,16 @@ int connect_server(struct stream *s)
|
|||||||
else if (obj_type(s->target) == OBJ_TYPE_PROXY) {
|
else if (obj_type(s->target) == OBJ_TYPE_PROXY) {
|
||||||
/* proxies exclusively run on raw_sock right now */
|
/* proxies exclusively run on raw_sock right now */
|
||||||
conn_prepare(srv_conn, protocol_by_family(srv_conn->addr.to.ss_family), xprt_get(XPRT_RAW));
|
conn_prepare(srv_conn, protocol_by_family(srv_conn->addr.to.ss_family), xprt_get(XPRT_RAW));
|
||||||
if (!objt_cs(s->si[1].end) || !objt_cs(s->si[1].end)->conn->ctrl)
|
if (!(srv_conn->ctrl))
|
||||||
return SF_ERR_INTERNAL;
|
return SF_ERR_INTERNAL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return SF_ERR_INTERNAL; /* how did we get there ? */
|
return SF_ERR_INTERNAL; /* how did we get there ? */
|
||||||
|
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
if ((!(srv->ssl_ctx.alpn_str) && !(srv->ssl_ctx.npn_str)) ||
|
if (!srv ||
|
||||||
srv->mux_proto)
|
((!(srv->ssl_ctx.alpn_str) && !(srv->ssl_ctx.npn_str)) ||
|
||||||
|
srv->mux_proto))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
srv_cs = si_alloc_cs(&s->si[1], srv_conn);
|
srv_cs = si_alloc_cs(&s->si[1], srv_conn);
|
||||||
|
Loading…
Reference in New Issue
Block a user