-
Notifications
You must be signed in to change notification settings - Fork 598
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
[clients] Calling .destroy()
doesn't destroy the clients
#2105
[clients] Calling .destroy()
doesn't destroy the clients
#2105
Comments
Findings: Verified by logging that aws-sdk-js-v3/packages/node-http-handler/src/node-http-handler.ts Lines 50 to 53 in c612c75
As per Node.js docs, the |
In Node.js, the request goes through even if Codeconst http = require("http");
const agent = new http.Agent({ keepAlive: true });
const options = {
hostname: "example.com",
method: "GET",
agent,
};
agent.destroy();
const req = http.request(options, (res) => {
console.log(`statusCode: ${res.statusCode}`);
res.on("data", (d) => {
process.stdout.write(d);
});
});
req.on("error", (error) => {
console.error(error);
});
req.end(); OutputstatusCode: 200
<!doctype html>
<html>
<head>
... Tested in the following Node.js versions:
|
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. |
Describe the bug
Calling
.destroy()
doesn't destroy the clients. I can still make calls using the clients.Your environment
SDK version number
@aws-sdk/client-dynamodb@3.7.0
Is the issue in the browser/Node.js/ReactNative?
All, but tested in Node.js
Details of the browser/Node.js/ReactNative version
Steps to reproduce
Code
Observed behavior
Prints the output of listTables command.
Expected behavior
Should throw an error since client is destroyed.
Additional context
This issue was noticed while working on
destroy()
functionality for Document Client #2097 (comment)The text was updated successfully, but these errors were encountered: