requestTimeout >= 6000
doesn't work
#1443
Labels
closing-soon
This issue will automatically close in 2 days unless further comments are made.
Background
I'm using
@aws-sdk/client-s3
to stream videos from an S3 bucket. I experienced issues with socket connections staying open forever if the video stream was interrupted. Thus, I tried settingrequestTimeout = 15_000
to cleanup connections (as mentioned in the docs).Problem
However, the
requestTimeout
didn't work. The request never timed out and the connection still stayed open forever. I experimented with different values and found thatrequestTimeout <= 5000
works. But values >= 6000 don't work.Suspected root cause
I looked at the source code and found the following code:
smithy-typescript/packages/node-http-handler/src/set-socket-timeout.ts
Lines 18 to 26 in c86a02c
The timeout is handled differently for values <= 6000. It seems to me as if the code for >= 6000 doesn't work correctly:
smithy-typescript/packages/node-http-handler/src/set-socket-timeout.ts
Lines 23 to 26 in c86a02c
The code above was introduced in #1384 and released in v3.2.0.
I downgraded to version
3.1.4
where timeouts >= 6000 worked again.The text was updated successfully, but these errors were encountered: