1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 00:59:24 -05:00

fix(ext/http): explicitly close resource after reading (#14471)

This commit is contained in:
Divy Srivastava 2022-05-04 20:09:15 +05:30 committed by GitHub
parent 253fbf9d2a
commit fb390c5701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View file

@ -871,7 +871,6 @@ Deno.test(
await respondWith(new Response(f.readable, { status: 200 }));
httpConn.close();
listener.close();
f.close();
})();
const resp = await fetch("http://127.0.0.1:4503/");
const body = await resp.arrayBuffer();

View file

@ -281,6 +281,7 @@
streamRid,
resourceRid,
);
core.tryClose(resourceRid);
readableStreamClose(respBody); // Release JS lock.
} catch (error) {
const connError = httpConn[connErrorSymbol];