diff --git a/src/mux_h2.c b/src/mux_h2.c index ea4f90f7a..370494d5b 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -361,6 +361,18 @@ static inline int h2s_id(const struct h2s *h2s) return h2s ? h2s->id : 0; } +/* returns true of the mux is currently busy as seen from stream */ +static inline 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; +} + /*********************************************************/ /* functions below are I/O callbacks from the connection */