mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-30 06:22:00 +01:00
BUG/MEDIUM: mux_pt: Don't try to send if handshake is not done.
While it is true the SSL code will do the right thing if the SSL handshake is not done, we have other types of handshake to deal with (proxy protocol, netscaler, ...). For those we definitively don't want to try to send data before it's done. All handshakes but SSL will go through the mux_pt, so in mux_pt_snd_buf, don't try to send while a handshake is pending.
This commit is contained in:
parent
d7d627c0b9
commit
b72d98a619
@ -253,7 +253,11 @@ static size_t mux_pt_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t
|
||||
/* Called from the upper layer, to send data */
|
||||
static size_t mux_pt_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t count, int flags)
|
||||
{
|
||||
size_t ret = cs->conn->xprt->snd_buf(cs->conn, buf, count, flags);
|
||||
size_t ret;
|
||||
|
||||
if (cs->conn->flags & CO_FL_HANDSHAKE)
|
||||
return 0;
|
||||
ret = cs->conn->xprt->snd_buf(cs->conn, buf, count, flags);
|
||||
|
||||
if (ret > 0)
|
||||
b_del(buf, ret);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user