summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorsimwipado <56857885+simwipado@users.noreply.github.com>2020-06-02 08:45:42 +1000
committerGitHub <noreply@github.com>2020-06-01 18:45:42 -0400
commit40419c664d402d4c3c5783d0ae337d23c106f619 (patch)
treee03c4200ec0ddfbc47897da3599dd6a290cb2624 /std
parent6b0d286a3d213fb1781558cacbd4135a9b381ae9 (diff)
fix(std/http): file server not closing files (#5952)
Diffstat (limited to 'std')
-rwxr-xr-xstd/http/file_server.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/std/http/file_server.ts b/std/http/file_server.ts
index 5586ed426..84ca45692 100755
--- a/std/http/file_server.ts
+++ b/std/http/file_server.ts
@@ -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,