Skip to content

Commit

Permalink
fix Downloaded size exceed 100% (#87) (#93)
Browse files Browse the repository at this point in the history
Co-authored-by: hong.guo <hong.guo@advantech.com.cn>
  • Loading branch information
SplitGemini and guoh27 authored Dec 20, 2022
1 parent 96c1938 commit f02ecf0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,10 @@ export class DownloaderHelper extends EventEmitter {
// Start the Download
this.__response = null;
this.__isAborted = false;

if (this.__request && !this.__request.destroyed) {
this.__request.destroy()
}
this.__request = this.__downloadRequest(this.__promise.resolve, this.__promise.reject);

// Error Handling
Expand Down

0 comments on commit f02ecf0

Please sign in to comment.