1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-08 07:08:27 -05:00

perf(http): avoid Set.has() when closing connection resource (#14085)

This commit is contained in:
Divy Srivastava 2022-03-23 13:05:34 +05:30 committed by Kitson Kelly
parent 04d8ab9839
commit 79181898e9

View file

@ -42,7 +42,6 @@
Set, Set,
SetPrototypeAdd, SetPrototypeAdd,
SetPrototypeDelete, SetPrototypeDelete,
SetPrototypeHas,
SetPrototypeValues, SetPrototypeValues,
StringPrototypeIncludes, StringPrototypeIncludes,
StringPrototypeToLowerCase, StringPrototypeToLowerCase,
@ -352,8 +351,7 @@
} }
} }
} finally { } finally {
if (SetPrototypeHas(httpConn.managedResources, streamRid)) { if (SetPrototypeDelete(httpConn.managedResources, streamRid)) {
SetPrototypeDelete(httpConn.managedResources, streamRid);
core.close(streamRid); core.close(streamRid);
} }
} }