diff --git a/.changeset/popular-dolls-allow.md b/.changeset/popular-dolls-allow.md new file mode 100644 index 00000000000..f2ce7d723c6 --- /dev/null +++ b/.changeset/popular-dolls-allow.md @@ -0,0 +1,5 @@ +--- +"@smithy/node-http-handler": patch +--- + +Fix constructor socketAcquisitionWarningTimeout does not work diff --git a/packages/node-http-handler/src/node-http-handler.ts b/packages/node-http-handler/src/node-http-handler.ts index a27a986609c..69e71181e7e 100644 --- a/packages/node-http-handler/src/node-http-handler.ts +++ b/packages/node-http-handler/src/node-http-handler.ts @@ -122,13 +122,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf } private resolveDefaultConfig(options?: NodeHttpHandlerOptions | void): ResolvedNodeHttpHandlerConfig { - const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = + options || {}; const keepAlive = true; const maxSockets = 50; return { connectionTimeout, requestTimeout: requestTimeout ?? socketTimeout, + socketAcquisitionWarningTimeout, httpAgent: (() => { if (httpAgent instanceof hAgent || typeof (httpAgent as hAgent)?.destroy === "function") { return httpAgent as hAgent;