Skip to content

Commit

Permalink
fix(status): update status when closed
Browse files Browse the repository at this point in the history
  • Loading branch information
ido-pluto committed Sep 1, 2024
1 parent e5bb8b6 commit b18f406
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,14 @@ export default class DownloadEngineFile extends EventEmitter<DownloadEngineFileE
this._downloadStatus = DownloadStatus.Active;
this.options.fetchStream.emit("resumed");
this.emit("resumed");
this._sendProgressDownloadPart();
}

public async close() {
if (this._closed) return;
if (this._downloadStatus !== DownloadStatus.Finished) {
this._downloadStatus = DownloadStatus.Cancelled;
this._sendProgressDownloadPart();
}
this._closed = true;
this._activeProgram?.abort();
Expand Down

0 comments on commit b18f406

Please sign in to comment.