diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-05-04 20:09:15 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 20:09:15 +0530 |
commit | fb390c57013a51338a58e33ed059c5604c14ab55 (patch) | |
tree | 4fa7b08ce1f797d20f95145e0b981cd61032c27b | |
parent | 253fbf9d2a15018cbba9c9ea2829bd70e9723362 (diff) |
fix(ext/http): explicitly close resource after reading (#14471)
-rw-r--r-- | cli/tests/unit/http_test.ts | 1 | ||||
-rw-r--r-- | ext/http/01_http.js | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/cli/tests/unit/http_test.ts b/cli/tests/unit/http_test.ts index 39bc82fb0..e9fb61dc4 100644 --- a/cli/tests/unit/http_test.ts +++ b/cli/tests/unit/http_test.ts @@ -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(); diff --git a/ext/http/01_http.js b/ext/http/01_http.js index 5c9deb5a3..c60a4b05a 100644 --- a/ext/http/01_http.js +++ b/ext/http/01_http.js @@ -281,6 +281,7 @@ streamRid, resourceRid, ); + core.tryClose(resourceRid); readableStreamClose(respBody); // Release JS lock. } catch (error) { const connError = httpConn[connErrorSymbol]; |