If an upload is in progress, we might have a connection pending
@@ -132,7 +132,8 @@ static void update_idle_timeout(h2o_http2_conn_t *conn)
{
h2o_timeout_unlink(&conn->_timeout_entry);
- if (conn->num_streams.pull.half_closed + conn->num_streams.push.half_closed == 0) {
+ /* no active streams + no request body upload in progress */
+ if (conn->num_streams.pull.half_closed + conn->num_streams.push.half_closed == 0 && !conn->_request_body_in_progress) {
assert(h2o_linklist_is_empty(&conn->_pending_reqs));
conn->_timeout_entry.cb = on_idle_timeout;
h2o_timeout_link(conn->super.ctx->loop, &conn->super.ctx->http2.idle_timeout, &conn->_timeout_entry);
