Skip to content

Commit 8e4b390

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: nodejs#32054 Refs: nodejs#30959 Refs: nodejs#30196 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent b546ade commit 8e4b390

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/_http_agent.js

Lines changed: 0 additions & 8 deletions
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)