diff --git a/src/mux_h2.c b/src/mux_h2.c
index 330e80f..fc484f8 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -68,11 +68,6 @@
 
 	/* states for the mux direction */
 	struct buffer mbuf[H2C_MBUF_CNT];   /* mux buffers (ring) */
-	int32_t msi; /* mux stream ID (<0 = idle) */
-	int32_t mfl; /* mux frame length (if dsi >= 0) */
-	int8_t  mft; /* mux frame type   (if dsi >= 0) */
-	int8_t  mff; /* mux frame flags  (if dsi >= 0) */
-	/* 16 bit hole here */
 	int32_t miw; /* mux initial window size for all new streams */
 	int32_t mws; /* mux window size. Can be negative. */
 	int32_t mfs; /* mux's max frame size */
@@ -936,7 +931,6 @@
 
 	h2c->dbuf = *input;
 	h2c->dsi = -1;
-	h2c->msi = -1;
 
 	h2c->last_sid = -1;
 
@@ -1103,18 +1097,6 @@
 	return h2s->sws + h2s->h2c->miw;
 }
 
-/* returns true of the mux is currently busy as seen from stream <h2s> */
-static inline __maybe_unused int h2c_mux_busy(const struct h2c *h2c, const struct h2s *h2s)
-{
-	if (h2c->msi < 0)
-		return 0;
-
-	if (h2c->msi == h2s_id(h2s))
-		return 0;
-
-	return 1;
-}
-
 /* marks an error on the connection. Before settings are sent, we must not send
  * a GOAWAY frame, and the error state will prevent h2c_send_goaway_error()
  * from verifying this so we set H2_CF_GOAWAY_FAILED to make sure it will not
@@ -1580,11 +1562,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_SETTINGS, h2c->conn);
 
-	if (h2c_mux_busy(h2c, NULL)) {
-		h2c->flags |= H2_CF_DEM_MBUSY;
-		goto out;
-	}
-
 	chunk_init(&buf, buf_data, sizeof(buf_data));
 	chunk_memcpy(&buf,
 	       "\x00\x00\x00"      /* length    : 0 for now */
@@ -1718,11 +1695,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_PREFACE, h2c->conn);
 
-	if (h2c_mux_busy(h2c, NULL)) {
-		h2c->flags |= H2_CF_DEM_MBUSY;
-		goto out;
-	}
-
 	res = br_tail(h2c->mbuf);
  retry:
 	if (!h2_get_buf(h2c, res)) {
@@ -1778,14 +1750,6 @@
 		goto out;
 	}
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		if (h2s)
-			h2s->flags |= H2_SF_BLK_MBUSY;
-		else
-			h2c->flags |= H2_CF_DEM_MBUSY;
-		goto out;
-	}
-
 	/* len: 8, type: 7, flags: none, sid: 0 */
 	memcpy(str, "\x00\x00\x08\x07\x00\x00\x00\x00\x00", 9);
 
@@ -1875,11 +1839,6 @@
 		goto ignore;
 	}
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		h2s->flags |= H2_SF_BLK_MBUSY;
-		goto out;
-	}
-
 	/* len: 4, type: 3, flags: none */
 	memcpy(str, "\x00\x00\x04\x03\x00", 5);
 	write_n32(str + 5, h2s->id);
@@ -1943,11 +1902,6 @@
 		goto ignore;
 	}
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		h2c->flags |= H2_CF_DEM_MBUSY;
-		goto out;
-	}
-
 	/* len: 4, type: 3, flags: none */
 	memcpy(str, "\x00\x00\x04\x03\x00", 5);
 
@@ -2010,11 +1964,6 @@
 		goto out;
 	}
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		h2s->flags |= H2_SF_BLK_MBUSY;
-		goto out;
-	}
-
 	/* len: 0x000000, type: 0(DATA), flags: ES=1 */
 	memcpy(str, "\x00\x00\x00\x00\x01", 5);
 	write_n32(str + 5, h2s->id);
@@ -2243,11 +2192,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_SETTINGS, h2c->conn);
 
-	if (h2c_mux_busy(h2c, NULL)) {
-		h2c->flags |= H2_CF_DEM_MBUSY;
-		goto out;
-	}
-
 	memcpy(str,
 	       "\x00\x00\x00"     /* length : 0 (no data)  */
 	       "\x04" "\x01"      /* type   : 4, flags : ACK */
@@ -2304,11 +2248,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_WU, h2c->conn);
 
-	if (h2c_mux_busy(h2c, NULL)) {
-		h2c->flags |= H2_CF_DEM_MBUSY;
-		goto out;
-	}
-
 	/* length: 4, type: 8, flags: none */
 	memcpy(str, "\x00\x00\x04\x08\x00", 5);
 	write_n32(str + 5, sid);
@@ -2407,11 +2346,6 @@
 	if (b_data(&h2c->dbuf) < 8)
 		goto out;
 
-	if (h2c_mux_busy(h2c, NULL)) {
-		h2c->flags |= H2_CF_DEM_MBUSY;
-		goto out;
-	}
-
 	memcpy(str,
 	       "\x00\x00\x08"     /* length : 8 (same payload) */
 	       "\x06" "\x01"      /* type   : 6, flags : ACK   */
@@ -3502,13 +3436,13 @@
 	}
 
 	if (h2c->rcvd_s > 0 &&
-	    !(h2c->flags & (H2_CF_MUX_MFULL | H2_CF_DEM_MBUSY | H2_CF_DEM_MROOM))) {
+	    !(h2c->flags & (H2_CF_MUX_MFULL | H2_CF_DEM_MROOM))) {
 		TRACE_PROTO("sending stream WINDOW_UPDATE frame", H2_EV_TX_FRAME|H2_EV_TX_WU, h2c->conn, h2s);
 		h2c_send_strm_wu(h2c);
 	}
 
 	if (h2c->rcvd_c > 0 &&
-	    !(h2c->flags & (H2_CF_MUX_MFULL | H2_CF_DEM_MBUSY | H2_CF_DEM_MROOM))) {
+	    !(h2c->flags & (H2_CF_MUX_MFULL | H2_CF_DEM_MROOM))) {
 		TRACE_PROTO("sending H2 WINDOW_UPDATE frame", H2_EV_TX_FRAME|H2_EV_TX_WU, h2c->conn);
 		h2c_send_conn_wu(h2c);
 	}
@@ -3783,7 +3717,7 @@
 		    (h2c->flags & H2_CF_GOAWAY_FAILED))
 			break;
 
-		if (h2c->flags & (H2_CF_MUX_MFULL | H2_CF_DEM_MBUSY | H2_CF_DEM_MROOM))
+		if (h2c->flags & (H2_CF_MUX_MFULL | H2_CF_DEM_MROOM))
 			flags |= CO_SFL_MSG_MORE;
 
 		for (buf = br_head(h2c->mbuf); b_size(buf); buf = br_del_head(h2c->mbuf)) {
@@ -4291,8 +4225,7 @@
 		return;
 	}
 
-	if ((h2c->flags & H2_CF_DEM_BLOCK_ANY && h2s->id == h2c->dsi) ||
-	    (h2c->flags & H2_CF_MUX_BLOCK_ANY && h2s->id == h2c->msi)) {
+	if ((h2c->flags & H2_CF_DEM_BLOCK_ANY && h2s->id == h2c->dsi)) {
 		/* unblock the connection if it was blocked on this
 		 * stream.
 		 */
@@ -5045,13 +4978,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		TRACE_STATE("mux output busy", H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
-		h2s->flags |= H2_SF_BLK_MBUSY;
-		TRACE_LEAVE(H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
-		return 0;
-	}
-
 	/* get the start line (we do have one) and the rest of the headers,
 	 * that we dump starting at header 0 */
 	sl = NULL;
@@ -5309,13 +5235,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		TRACE_STATE("mux output busy", H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
-		h2s->flags |= H2_SF_BLK_MBUSY;
-		TRACE_LEAVE(H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
-		return 0;
-	}
-
 	/* get the start line (we do have one) and the rest of the headers,
 	 * that we dump starting at header 0 */
 	sl = NULL;
@@ -5711,13 +5630,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_DATA, h2c->conn, h2s);
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		TRACE_STATE("mux output busy", H2_EV_TX_FRAME|H2_EV_TX_DATA, h2c->conn, h2s);
-		h2s->flags |= H2_SF_BLK_MBUSY;
-		TRACE_LEAVE(H2_EV_TX_FRAME|H2_EV_TX_DATA, h2c->conn, h2s);
-		goto end;
-	}
-
 	htx = htx_from_buf(buf);
 
 	/* We only come here with HTX_BLK_DATA blocks */
@@ -6014,13 +5926,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_DATA, h2c->conn, h2s);
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		TRACE_STATE("mux output busy", H2_EV_TX_FRAME|H2_EV_TX_DATA, h2c->conn, h2s);
-		h2s->flags |= H2_SF_BLK_MBUSY;
-		TRACE_LEAVE(H2_EV_TX_FRAME|H2_EV_TX_DATA, h2c->conn, h2s);
-		goto end;
-	}
-
 	htx = htx_from_buf(buf);
 
  next_data:
@@ -6094,13 +5999,6 @@
 
 	TRACE_ENTER(H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
 
-	if (h2c_mux_busy(h2c, h2s)) {
-		TRACE_STATE("mux output busy", H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
-		h2s->flags |= H2_SF_BLK_MBUSY;
-		TRACE_LEAVE(H2_EV_TX_FRAME|H2_EV_TX_HDR, h2c->conn, h2s);
-		goto end;
-	}
-
 	/* get trailers. */
 	hdr = 0;
 	for (blk = htx_get_head_blk(htx); blk; blk = htx_get_next_blk(htx, blk)) {
@@ -6689,9 +6587,7 @@
 	if (pfx)
 		chunk_appendf(msg, "\n%s", pfx);
 
-	chunk_appendf(msg, " .msi=%d"
-		      " .mbuf=[%u..%u|%u],h=[%u@%p+%u/%u],t=[%u@%p+%u/%u]",
-		      h2c->msi,
+	chunk_appendf(msg, " .mbuf=[%u..%u|%u],h=[%u@%p+%u/%u],t=[%u@%p+%u/%u]",
 		      br_head_idx(h2c->mbuf), br_tail_idx(h2c->mbuf), br_size(h2c->mbuf),
 		      (unsigned int)b_data(hmbuf), b_orig(hmbuf),
 		      (unsigned int)b_head_ofs(hmbuf), (unsigned int)b_size(hmbuf),
