diff --git a/src/stream_interface.c b/src/stream_interface.c index 9cbfab13e..3a5a39f23 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -1203,8 +1203,9 @@ int si_cs_recv(struct conn_stream *cs) * that if such an event is not handled above in splice, it will be handled here by * recv(). */ - while (!(conn->flags & (CO_FL_ERROR | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE)) && - (!(cs->flags & (CS_FL_ERROR|CS_FL_EOS)) || (cs->flags & CS_FL_RCV_MORE)) && !(ic->flags & CF_SHUTR)) { + while ((cs->flags & CS_FL_RCV_MORE) || + (!(conn->flags & (CO_FL_ERROR | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE)) && + (!(cs->flags & (CS_FL_ERROR|CS_FL_EOS))) && !(ic->flags & CF_SHUTR))) { /* may be null. This is the mux responsibility to set * CS_FL_RCV_MORE on the CS if more space is needed. */