In si_cs_send() and si_cs_recv(), we explicitly test the connection's mux is
defined to proceed. For si_cs_recv(), it is probably a bit overkill. But
opportunistic sends are possible from the moment the server connection is
created. So it is safer to do this test.
This patch may be backported as far as 1.9 if necessary.
(cherry picked from commit
e96993b1f203a14d2ef1eaa70be595c7d5b98643)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit
17c13f0fdc42e53e1034a7e4ef0147184afd4221)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
if (conn->flags & CO_FL_SOCK_WR_SH || oc->flags & CF_SHUTW)
return 1;
+ /* we must wait because the mux is not installed yet */
+ if (!conn->mux)
+ return 0;
+
if (oc->pipe && conn->xprt->snd_pipe && conn->mux->snd_pipe) {
ret = conn->mux->snd_pipe(cs, oc->pipe);
if (ret > 0)
if (ic->flags & CF_SHUTR)
return 1;
+ /* we must wait because the mux is not installed yet */
+ if (!conn->mux)
+ return 0;
+
/* stop here if we reached the end of data */
if (cs->flags & CS_FL_EOS)
goto end_recv;