Skip to content

Commit ba2921f

Browse files
fix(node-http-handler): fix constructor socketAcquisitionWarningTimeout does not work
1 parent 9b26765 commit ba2921f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/popular-dolls-allow.md

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

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,14 @@ 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 } = options || {};
126126
const keepAlive = true;
127127
const maxSockets = 50;
128128

129129
return {
130130
connectionTimeout,
131131
requestTimeout: requestTimeout ?? socketTimeout,
132+
socketAcquisitionWarningTimeout,
132133
httpAgent: (() => {
133134
if (httpAgent instanceof hAgent || typeof (httpAgent as hAgent)?.destroy === "function") {
134135
return httpAgent as hAgent;

0 commit comments

Comments
 (0)