Skip to content

Commit

Permalink
delay write stream creation, #140
Browse files Browse the repository at this point in the history
  • Loading branch information
Last-Order committed Nov 24, 2024
1 parent d062027 commit ad352a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/file_concentrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class FileConcentrator {
if (ignoreBreakpoints) {
this.ignoreBreakpoints = true;
}
this.createNextWriteStream();
}

private async createNextWriteStream(): Promise<void> {
Expand Down Expand Up @@ -166,6 +165,9 @@ class FileConcentrator {
}

public addTasks(tasks: ConcentrationTask[]) {
if (!this.writeStream) {
this.createNextWriteStream();
}
for (const task of tasks) {
this.tasks[task.index] = task;
}
Expand Down

0 comments on commit ad352a8

Please sign in to comment.