File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ This page contains the information you need to connect and use the Client with
1212* <<client-connect-proxy, Connecting through a proxy>>
1313* <<client-error-handling, Handling errors>>
1414* <<keep-alive, Keep-alive connections>>
15+ * <<close-connections, Closing a client's connections>>
1516* <<product-check, Automatic product check>>
1617
1718[[authentication]]
@@ -691,6 +692,20 @@ const client = new Client({
691692})
692693----
693694
695+ [discrete]
696+ [[close-connections]]
697+ === Closing a client's connections
698+
699+ If you would like to close all open connections being managed by an instance of the client, use the `close()` function:
700+
701+ [source,js]
702+ ----
703+ const client = new Client({
704+ node: 'http://localhost:9200'
705+ });
706+ client.close();
707+ ----
708+
694709[discrete]
695710[[product-check]]
696711=== Automatic product check
You can’t perform that action at this time.
0 commit comments