1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -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 GitHub
parent 7feb25d448
commit 5edcd9dd35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}
}