From 53df0c1c3279cace88c3da0c5a8791841d742b83 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 28 Apr 2026 04:27:42 +0000 Subject: [PATCH] chore: Update dist --- THIRD-PARTY | 2 +- dist/index.js | 43 +++++++++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/THIRD-PARTY b/THIRD-PARTY index 4b18b9a..a991e2b 100644 --- a/THIRD-PARTY +++ b/THIRD-PARTY @@ -1709,7 +1709,7 @@ The following npm packages may be included in this product: - @smithy/middleware-content-length@4.2.14 - @smithy/middleware-endpoint@4.4.31 - @smithy/middleware-stack@4.2.14 - - @smithy/node-http-handler@4.6.0 + - @smithy/node-http-handler@4.6.1 - @smithy/property-provider@4.2.14 - @smithy/shared-ini-file-loader@4.4.9 - @smithy/signature-v4@5.3.14 diff --git a/dist/index.js b/dist/index.js index 7d71573..2609149 100644 --- a/dist/index.js +++ b/dist/index.js @@ -23546,6 +23546,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf deref() { return this.session; } + close() { + if (!this.session.closed) { + this.session.close(); + } + } destroy() { this.refs = 0; if (!this.session.destroyed) { @@ -23629,16 +23634,18 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf } }); } - const destroySessionCb = () => { - session.destroy(); - this.removeFromPool(url, ref); + const graceful = () => { + this.removeFromPoolAndClose(url, ref); }; - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.removeFromPool(url, ref)); + const ensureDestroyed = () => { + this.removeFromPoolAndCheckedDestroy(url, ref); + }; + session.on("goaway", graceful); + session.on("error", ensureDestroyed); + session.on("frameError", ensureDestroyed); + session.on("close", ensureDestroyed); if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed); } pool.offerLast(ref); ref.retain(); @@ -23652,15 +23659,14 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf const ref = new ClientHttp2SessionRef(http22.connect(url)); const session = ref.deref(); session.settings({ maxConcurrentStreams: 1 }); - const destroySession = () => { - session.destroy(); + const ensureDestroyed = () => { + ref.destroy(); }; - session.on("goaway", destroySession); - session.on("error", destroySession); - session.on("frameError", destroySession); - session.on("close", destroySession); + session.on("error", ensureDestroyed); + session.on("frameError", ensureDestroyed); + session.on("close", ensureDestroyed); if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySession); + session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed); } ref.retain(); return ref; @@ -23701,8 +23707,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf } return pools; } - removeFromPool(authority, ref) { + removeFromPoolAndClose(authority, ref) { this.connectionPools.get(authority)?.remove(ref); + ref.close(); + } + removeFromPoolAndCheckedDestroy(authority, ref) { + this.connectionPools.get(authority)?.remove(ref); + ref.destroy(); } getPool(url) { if (!this.connectionPools.has(url)) {