summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-03-23 13:05:34 +0530
committerGitHub <noreply@github.com>2022-03-23 13:05:34 +0530
commit5edcd9dd355483df6b9a8c34ca94f3f54d672b9e (patch)
tree3a77a4396b3cc8629023a19cd3de9c0ff44d01eb
parent7feb25d448b356ac869ef919c57ef314382a8eb7 (diff)
perf(http): avoid Set.has() when closing connection resource (#14085)
-rw-r--r--ext/http/01_http.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/http/01_http.js b/ext/http/01_http.js
index 91824b000..7db3fdbe8 100644
--- a/ext/http/01_http.js
+++ b/ext/http/01_http.js
@@ -42,7 +42,6 @@
Set,
SetPrototypeAdd,
SetPrototypeDelete,
- SetPrototypeHas,
SetPrototypeValues,
StringPrototypeIncludes,
StringPrototypeToLowerCase,
@@ -354,8 +353,7 @@
}
}
} finally {
- if (SetPrototypeHas(httpConn.managedResources, streamRid)) {
- SetPrototypeDelete(httpConn.managedResources, streamRid);
+ if (SetPrototypeDelete(httpConn.managedResources, streamRid)) {
core.close(streamRid);
}
}