io_timeout is used when the client or server is expected to make progress
@@ -154,7 +154,7 @@ static void cleanup_connection(struct st_h2o_http1_conn_t *conn)
close_connection(conn, 1);
return;
} else {
- if (conn->sock->input->size == 0) {
+ if (conn->_io_timeout_entry.cb == NULL) {
--*get_connection_state_counter(conn->super.ctx, conn->super.state);
h2o_linklist_unlink(&conn->super._conns);
h2o_linklist_insert(&conn->super.ctx->_conns.idle, &conn->super._conns);
