BUG/MINOR: stream-int: don't try to receive again after receiving an EOS

When an end of stream has been reported, we should not try to receive again
as the mux layer might not be prepared to this and could report unexpected
errors.

This is more of a strengthening measure that follows the introduction of
conn_stream that came in 1.8. It's desired to backport this into 1.8 though
it's uncertain at this time whether it may have caused real issues.
This commit is contained in:
Willy Tarreau 2017-12-12 09:58:40 +01:00
parent 91bfdd7e04
commit b78b80efe5

View File

@ -1176,7 +1176,7 @@ static void si_cs_recv_cb(struct conn_stream *cs)
* recv().
*/
while (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE)) &&
!(cs->flags & CS_FL_ERROR) && !(ic->flags & CF_SHUTR)) {
!(cs->flags & (CS_FL_ERROR|CS_FL_EOS)) && !(ic->flags & CF_SHUTR)) {
max = channel_recv_max(ic);
if (!max) {