Skip to content

Commit

Permalink
fix(std/http): file server not closing files (#5952)
Browse files Browse the repository at this point in the history
  • Loading branch information
simwipado authored Jun 1, 2020
1 parent 6b0d286 commit 40419c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions std/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 40419c6

Please sign in to comment.