Skip to content

Commit

Permalink
fix: close write steam on finish
Browse files Browse the repository at this point in the history
Closes #706
  • Loading branch information
develar committed Aug 27, 2016
1 parent 8f55a2d commit a6b7573
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/httpRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function doDownload(url: string, destination: string, redirectCount: number, opt
.pipe(fileOut)
}

fileOut.on("finish", callback)
fileOut.on("finish", () => (<any>fileOut.close)(callback))
})
.catch(callback)

Expand Down

0 comments on commit a6b7573

Please sign in to comment.