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:
parent
6b0d286a3d
commit
40419c664d
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue