BUG/MEDIUM: stream_interface: Don't report read0 if we were not connected.

In si_cs_recv(), report that arrive at the end of stream only if we were
indeed connected, we don't want that if the connection failed and we're about
to retry.
This commit is contained in:
Olivier Houchard 2018-12-13 15:38:16 +01:00 committed by Willy Tarreau
parent ab8b075ff0
commit fd0c2dcf00

View File

@ -1340,11 +1340,13 @@ int si_cs_recv(struct conn_stream *cs)
return (cur_read != 0) || si_rx_blocked(si);
out_shutdown_r:
/* we received a shutdown */
ic->flags |= CF_READ_NULL;
if (ic->flags & CF_AUTO_CLOSE)
channel_shutw_now(ic);
stream_sock_read0(si);
if (conn->flags & CO_FL_CONNECTED) {
/* we received a shutdown */
ic->flags |= CF_READ_NULL;
if (ic->flags & CF_AUTO_CLOSE)
channel_shutw_now(ic);
stream_sock_read0(si);
}
return 1;
}