Skip to content

Commit

Permalink
fix(http): file server not closing files (denoland/deno#5952)
Browse files Browse the repository at this point in the history
  • Loading branch information
simwipado authored and caspervonb committed Jan 31, 2021
1 parent 5ceea7b commit 370e9e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http/file_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ export async function serveFile(
if (contentTypeValue) {
headers.set("content-type", contentTypeValue);
}
req.done.then(() => {
file.close();
});
return {
status: 200,
body: file,
Expand Down

0 comments on commit 370e9e4

Please sign in to comment.