File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,12 @@ private String generateConfigVariable(int number) {
320
320
private void generateDestroyMethod () {
321
321
// Generates the destroy() method, and calls the destroy() method of
322
322
// any runtime plugin that claims to have a destroy method.
323
+ if (applicationProtocol .isHttpProtocol ()) {
324
+ writer .writeDocs ("Destroy underlying resources, like sockets. It's usually not necessary to do this.\n "
325
+ + "However in Node.js, it's best to explicitly shut down the client's agent when it is no longer "
326
+ + "needed.\n Otherwise, sockets might stay open for quite a long time before the server terminates "
327
+ + "them." );
328
+ }
323
329
writer .openBlock ("destroy(): void {" , "}" , () -> {
324
330
writer .pushState (CLIENT_DESTROY_SECTION );
325
331
for (RuntimeClientPlugin plugin : runtimePlugins ) {
You can’t perform that action at this time.
0 commit comments