smithy-lang / smithy-typescript

Smithy code generators for TypeScript. (in development)
Apache License 2.0
211 stars 78 forks source link

Remove AbortSignal event listeners when requests complete #1332

Closed paulbrimicombe closed 1 week ago

paulbrimicombe commented 2 weeks ago

Issue #1318, if available:

Description of changes:

Currently if an AbortSignal is re-used across multiple requests, more and more listeners will accumulate, leading to memory leaks. In order to mitigate this, we should remove any event listeners we add to the AbortSignal when the request completes.

Notes on the code changes


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

paulbrimicombe commented 1 week ago

Thanks for approving and merging so quickly @kuhe and @haydenbaker