File tree 1 file changed +15
-0
lines changed
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
12
12
* <<client-connect-proxy, Connecting through a proxy>>
13
13
* <<client-error-handling, Handling errors>>
14
14
* <<keep-alive, Keep-alive connections>>
15
+ * <<close-connections, Closing a client's connections>>
15
16
* <<product-check, Automatic product check>>
16
17
17
18
[[authentication]]
@@ -691,6 +692,20 @@ const client = new Client({
691
692
})
692
693
----
693
694
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
+
694
709
[discrete]
695
710
[[product-check]]
696
711
=== Automatic product check
You can’t perform that action at this time.
0 commit comments