Skip to content

Commit 12b8345

Browse files
Flarnatargos
authored andcommitted
http, async_hooks: remove unneeded reference to wrapping resource
Remove the reference from handle to the unique/wrapping resource ReusedHandle as there is meanwhile a strong reference for all async resources in place via AsyncWarp::resource_. PR-URL: #32054 Refs: #30959 Refs: #30196 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 16a913f commit 12b8345

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/_http_agent.js

-8
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,10 @@ const kOnKeylog = Symbol('onkeylog');
4545
// ClientRequest.onSocket(). The Agent is now *strictly*
4646
// concerned with managing a connection pool.
4747

48-
const kReusedHandle = Symbol('kReusedHandle');
4948
class ReusedHandle {
5049
constructor(type, handle) {
5150
this.type = type;
5251
this.handle = handle;
53-
// We need keep the resource object alive from this object, because
54-
// domains rely on GC of the resource object for lifetime tracking.
55-
// TODO(addaleax): This should really apply to all uses of
56-
// AsyncWrap::AsyncReset() when the resource is not the AsyncWrap object
57-
// itself. However, HTTPClientAsyncResource and HTTPServerAsyncResource
58-
// hold on to other objects, inhibiting GC.
59-
handle[kReusedHandle] = this;
6052
}
6153
}
6254

0 commit comments

Comments
 (0)