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

Runtime config is mistakenly reused across clients re-instantiation #2557

Closed
AllanZhengYP opened this issue Jul 8, 2021 · 1 comment · Fixed by #2574
Closed

Runtime config is mistakenly reused across clients re-instantiation #2557

AllanZhengYP opened this issue Jul 8, 2021 · 1 comment · Fixed by #2574
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@AllanZhengYP
Copy link
Contributor

Describe the bug

This is discovered when investigating #2550, the HTTP/2 request handler is reused across the re-instantiation of TranscribeStreamingClient. The root cause is that the client's runtime config is exported as constant. When user constructs different TranscribeStreamingClient, the same runtime config is reused. As a result, same http client is used across the clients, similar to other configs like credential provider.

Your environment

SDK version number

@aws-sdk/client-transcribe-streaming@3.*.*

Is the issue in the browser/Node.js/ReactNative?

Browser & Node.js & ReactNative

Details of the browser/Node.js/ReactNative version

Paste output of npx envinfo --browsers or node -v or react-native -v

Steps to reproduce

const client1 = new TranscribeStreamingClient({});
const client2 = new TranscribeStreamingClient({});
console.log(client1.config.requestHandler === client2.config.requestHandler);
// prints true

Observed behavior

Different clients use the same request handler.

Expected behavior

They should not use the same handler.

@AllanZhengYP AllanZhengYP added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 8, 2021
@AllanZhengYP AllanZhengYP changed the title Runtime config mistakenly reused across clients re-instantiation Runtime config is mistakenly reused across clients re-instantiation Jul 8, 2021
@github-actions
Copy link

github-actions bot commented Aug 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant