MEDIUM: backend: Defer conn_xprt_start() after mux creation

In connect_server(), defer the call to conn_xprt_start() until after we
had a chance to create the mux. The xprt can behave differently
depending on if a mux is or is not available at this point, as if it is,
it may want to wait until some data comes from the mux.

This does not need to be backported.
This commit is contained in:
Olivier Houchard 2025-11-07 11:24:14 +01:00 committed by Olivier Houchard
parent 3bc90d01d1
commit 25559e7055

View File

@ -2175,7 +2175,6 @@ int connect_server(struct stream *s)
return SF_ERR_INTERNAL;
}
}
conn_xprt_start(srv_conn);
/* We have to defer the mux initialization until after si_connect()
* has been called, as we need the xprt to have been properly
@ -2212,6 +2211,14 @@ int connect_server(struct stream *s)
}
}
/*
* Now that the mux may have been created, we can start the xprt.
* We had to wait until then, because the xprt may behave differently
* depending on if a mux already exists, and it can receive data
* from the stream, or not.
*/
conn_xprt_start(srv_conn);
#if defined(HAVE_SSL_0RTT)
/* The flags change below deserve some explanation: when we want to
* use early data, we first want to make sure that a mux is installed