diff --git a/THIRD-PARTY b/THIRD-PARTY index b9c2fb9e..ddda5874 100644 --- a/THIRD-PARTY +++ b/THIRD-PARTY @@ -434,7 +434,7 @@ The following npm packages may be included in this product: - @aws-sdk/signature-v4-multi-region@3.996.46 - @smithy/core@3.33.3 - - @smithy/types@4.17.2 + - @smithy/types@4.18.0 These packages each contain the following license: @@ -1050,7 +1050,7 @@ The following npm packages may be included in this product: - @aws-sdk/xml-builder@3.972.40 - @smithy/credential-provider-imds@4.5.2 - @smithy/fetch-http-handler@5.7.2 - - @smithy/node-http-handler@4.11.3 + - @smithy/node-http-handler@4.12.1 - @smithy/signature-v4@5.6.12 These packages each contain the following license: diff --git a/dist/index.js b/dist/index.js index 55cd567a..e3047799 100644 --- a/dist/index.js +++ b/dist/index.js @@ -34322,6 +34322,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf destroy() { this.refs = 0; if (!this.session.destroyed) { + this.session.setTimeout(0); this.session.destroy(); } } @@ -34434,9 +34435,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf session.on("error", ensureDestroyed); session.on("frameError", ensureDestroyed); session.on("close", ensureDestroyed); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed); - } + const timeout = connectionConfiguration.requestTimeout ?? 3e5; + session.setTimeout(timeout, ensureDestroyed); ref.retain(); return ref; } @@ -34636,6 +34636,9 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf resolve({ response: httpResponse }); if (useIsolatedSession) { session.close(); + clientHttp2Stream.on("end", () => { + ref.destroy(); + }); } }); clientHttp2Stream.on("close", () => { @@ -34645,7 +34648,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf this.connectionManager.release(requestContext, ref); } if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + const error3 = new Error("Unexpected error: http2 request did not get a response"); + if (session.destroyed) { + error3.name = "TimeoutError"; + } + rejectWithDestroy(error3); } }); writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);