From 5edcd9dd355483df6b9a8c34ca94f3f54d672b9e Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Wed, 23 Mar 2022 13:05:34 +0530 Subject: [PATCH] perf(http): avoid Set.has() when closing connection resource (#14085) --- ext/http/01_http.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/http/01_http.js b/ext/http/01_http.js index 91824b0001..7db3fdbe8b 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); } }