Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class Agent extends DispatcherBase {
const client = ref.deref()
/* istanbul ignore else: gc is undeterministic */
if (client) {
this[kFinalizer].unregister(client)
closePromises.push(client.close())
}
}
Expand All @@ -137,6 +138,7 @@ class Agent extends DispatcherBase {
const client = ref.deref()
/* istanbul ignore else: gc is undeterministic */
if (client) {
this[kFinalizer].unregister(client)
destroyPromises.push(client.destroy(err))
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/core/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let tls // include tls conditionally since it is not always available
let SessionCache
// FIXME: remove workaround when the Node bug is fixed
// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308
if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) {
if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) {
SessionCache = class WeakSessionCache {
constructor (maxCachedSessions) {
this._maxCachedSessions = maxCachedSessions
Expand Down
2 changes: 1 addition & 1 deletion test/balanced-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ const cases = [
expectedRatios: [0.34, 0.34, 0.32],

// Skip because the behavior of Node.js has changed
skip: nodeMajor >= 19
skip: nodeMajor >= 18
},

// 8
Expand Down