We used to return >0 indicating a success when an error was present on the
connection, preventing the caller from detecting and handling it. This for
example happens when sending too many headers in a frame, making the request
impossible to decompress.
goto conn_err;
}
+ if (h2c->st0 >= H2_CS_ERROR)
+ return 0;
+
if (h2s->st >= H2_SS_ERROR) {
/* stream error : send RST_STREAM */
h2c->st0 = H2_CS_FRAME_A;
}
h2s->cs->data_cb->recv(h2s->cs);
+
if (h2s->cs->data_cb->wake(h2s->cs) < 0) {
/* cs has just been destroyed, we have to kill h2s. */
error = H2_ERR_STREAM_CLOSED;
goto strm_err;
}
+ if (h2c->st0 >= H2_CS_ERROR)
+ return 0;
+
if (h2s->st >= H2_SS_ERROR) {
/* stream error : send RST_STREAM */
h2c->st0 = H2_CS_FRAME_A;