1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -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 })); await respondWith(new Response(f.readable, { status: 200 }));
httpConn.close(); httpConn.close();
listener.close(); listener.close();
f.close();
})(); })();
const resp = await fetch("http://127.0.0.1:4503/"); const resp = await fetch("http://127.0.0.1:4503/");
const body = await resp.arrayBuffer(); const body = await resp.arrayBuffer();

View file

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