Skip to content

Commit

Permalink
fix(node-http-handler): fix constructor socketAcquisitionWarningTimeo…
Browse files Browse the repository at this point in the history
…ut does not work (#1529)

* fix(node-http-handler): fix constructor socketAcquisitionWarningTimeout does not work

* style(node-http-handler): fix code format

* set increment to patch

---------

Co-authored-by: George Fu <kuhe@users.noreply.github.com>
  • Loading branch information
yuji-hatakeyama and kuhe authored Feb 24, 2025
1 parent 9b26765 commit 54d2416
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/popular-dolls-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@smithy/node-http-handler": patch
---

Fix constructor socketAcquisitionWarningTimeout does not work
4 changes: 3 additions & 1 deletion packages/node-http-handler/src/node-http-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 54d2416

Please sign in to comment.