mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
fix(ext/http): explicitly close resource after reading (#14471)
This commit is contained in:
parent
253fbf9d2a
commit
fb390c5701
2 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||||
|
|
|
@ -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];
|
||||||
|
|
Loading…
Reference in a new issue