static size_t h3_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count)
{
+ struct h3s *h3s = qcs->ctx;
+ struct h3c *h3c = h3s->h3c;
size_t total = 0;
enum htx_blk_type btype;
struct htx *htx;
htx = htx_from_buf(buf);
- while (count && !htx_is_empty(htx) && !(qcs->flags & QC_SF_BLK_MROOM)) {
+ while (count && !htx_is_empty(htx) &&
+ !(qcs->flags & QC_SF_BLK_MROOM) && !h3c->err) {
+
idx = htx_get_head(htx);
blk = htx_get_blk(htx, idx);
btype = htx_get_blk_type(blk);
}
}
+ /* Interrupt sending on connection error. */
+ if (unlikely(h3c->err)) {
+ qcc_set_error(qcs->qcc, h3c->err, 1);
+ goto out;
+ }
+
/* RFC 9114 4.1. HTTP Message Framing
*
* A server can send a complete response prior to the client sending an