Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Marczak <36894700+szmarczak@users.noreply.github.com>2020-11-12 00:22:41 +0300
committerAntoine du Hamel <duhamelantoine1995@gmail.com>2020-11-15 02:17:32 +0300
commit9ea0fae7ea6eb8213499d378ed5ae3604e00c8c3 (patch)
tree7f580d7c2c3668b46af2a4e59c75deb75307ffc0 /doc/api/dns.md
parentd5e4e194700202eddb3de7e9fe9f49a066f711c5 (diff)
dns: add a cancel() method to the promise Resolver
PR-URL: https://github.com/nodejs/node/pull/33099 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'doc/api/dns.md')
-rw-r--r--doc/api/dns.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/api/dns.md b/doc/api/dns.md
index 613bd2465b9..727b5dc9b2d 100644
--- a/doc/api/dns.md
+++ b/doc/api/dns.md
@@ -730,6 +730,14 @@ The following methods from the `dnsPromises` API are available:
* [`resolver.reverse()`][`dnsPromises.reverse()`]
* [`resolver.setServers()`][`dnsPromises.setServers()`]
+### `resolver.cancel()`
+<!-- YAML
+added: REPLACEME
+-->
+
+Cancel all outstanding DNS queries made by this resolver. The corresponding
+promises will be rejected with an error with code `ECANCELLED`.
+
### `dnsPromises.getServers()`
<!-- YAML
added: v10.6.0