Skip to content

Commit 54d2416

Browse files
yuji-hatakeyamakuhe
andauthoredFeb 24, 2025
fix(node-http-handler): fix constructor socketAcquisitionWarningTimeout 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 <[email protected]>
1 parent 9b26765 commit 54d2416

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
 

‎.changeset/popular-dolls-allow.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smithy/node-http-handler": patch
3+
---
4+
5+
Fix constructor socketAcquisitionWarningTimeout does not work

‎packages/node-http-handler/src/node-http-handler.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
122122
}
123123

124124
private resolveDefaultConfig(options?: NodeHttpHandlerOptions | void): ResolvedNodeHttpHandlerConfig {
125-
const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};
125+
const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } =
126+
options || {};
126127
const keepAlive = true;
127128
const maxSockets = 50;
128129

129130
return {
130131
connectionTimeout,
131132
requestTimeout: requestTimeout ?? socketTimeout,
133+
socketAcquisitionWarningTimeout,
132134
httpAgent: (() => {
133135
if (httpAgent instanceof hAgent || typeof (httpAgent as hAgent)?.destroy === "function") {
134136
return httpAgent as hAgent;

0 commit comments

Comments
 (0)