From 40419c664d402d4c3c5783d0ae337d23c106f619 Mon Sep 17 00:00:00 2001 From: simwipado <56857885+simwipado@users.noreply.github.com> Date: Tue, 2 Jun 2020 08:45:42 +1000 Subject: fix(std/http): file server not closing files (#5952) --- std/http/file_server.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'std/http/file_server.ts') 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, -- cgit v1.2.3