/*
* Indicates whether or not we may receive data. The rules are the following :
* - if an error or a shutdown for reads was detected on the connection we
- must not attempt to receive
+ * must not attempt to receive
+ * - if we are waiting for the connection establishment, we must not attempt
+ * to receive
+ * - if an error was detected on the stream we must not attempt to receive
+ * - if reads are explicitly disabled, we must not attempt to receive
* - if the input buffer failed to be allocated or is full , we must not try
* to receive
- * - if he input processing is busy waiting for the output side, we may
- * attempt to receive
+ * - if the mux is not blocked on an input condition, we may attempt to receive
* - otherwise must may not attempt to receive
*/
static inline int h1_recv_allowed(const struct h1c *h1c)
return 0;
}
+ if (h1c->h1s && (h1c->h1s->flags & H1S_F_ERROR)) {
+ TRACE_DEVEL("recv not allowed because of error on h1s", H1_EV_H1C_RECV|H1_EV_H1C_BLK, h1c->conn);
+ return 0;
+ }
+
if (h1c->flags & H1C_F_WAIT_OPPOSITE) {
TRACE_DEVEL("recv not allowed (wait_opposite)", H1_EV_H1C_RECV|H1_EV_H1C_BLK, h1c->conn);
return 0;