0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

fix(std/http): file server not closing files (#5952)

This commit is contained in:
simwipado 2020-06-02 08:45:42 +10:00 committed by GitHub
parent 6b0d286a3d
commit 40419c664d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,