Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch-http-handler: abortSignal, requestTimeout issues #974

Closed
u873838 opened this issue Sep 28, 2023 · 3 comments · Fixed by #1308
Closed

fetch-http-handler: abortSignal, requestTimeout issues #974

u873838 opened this issue Sep 28, 2023 · 3 comments · Fixed by #1308
Labels
pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@u873838
Copy link

u873838 commented Sep 28, 2023

If an abort signal is passed, it is first included in the request options:

https://github.com/awslabs/smithy-typescript/blob/2f70f105a1093c0c5d1caaa84ce292e5917f31ec/packages/fetch-http-handler/src/fetch-http-handler.ts#L99-L101

Then later, the abort signal will be added to the race promises:

https://github.com/awslabs/smithy-typescript/blob/2f70f105a1093c0c5d1caaa84ce292e5917f31ec/packages/fetch-http-handler/src/fetch-http-handler.ts#L144-L154

It seems like the latter block of code can be removed. Relying solely on fetch's internal abort signal signally mechanism seems preferable.

@u873838
Copy link
Author

u873838 commented Sep 28, 2023

The latter code block also suffers from the same issue that I reported here: aws/aws-sdk-js-v3#4872.

@u873838
Copy link
Author

u873838 commented Sep 28, 2023

requestTimeout is also faulty, as it does not cancel in-flight requests:

https://github.com/awslabs/smithy-typescript/blob/2f70f105a1093c0c5d1caaa84ce292e5917f31ec/packages/fetch-http-handler/src/request-timeout.ts#L1-L11

@u873838 u873838 changed the title fetch-http-handler: abortSignal handled twice fetch-http-handler: abortSignal, requestTimeout issues Sep 28, 2023
@kuhe kuhe added the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Jun 18, 2024
@kuhe
Copy link
Contributor

kuhe commented Jun 18, 2024

can track release in aws/aws-sdk-js-v3#4872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
2 participants