From 7577fd83998d8e0c8590a8c3308abe91e69a35c3 Mon Sep 17 00:00:00 2001 From: atlowChemi Date: Sun, 25 Jun 2023 23:29:58 +0300 Subject: [PATCH] https: Server add `asyncDispose` --- doc/api/https.md | 13 +++++++++++++ lib/https.js | 6 ++++++ .../test-https-server-async-dispose.js | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 test/parallel/test-https-server-async-dispose.js diff --git a/doc/api/https.md b/doc/api/https.md index c4dbd898613d6f..7f98ed761119da 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -135,6 +135,18 @@ added: v0.1.90 See [`server.close()`][] in the `node:http` module. + +### `server[Symbol.asyncDispose]()` + + + +> Stability: 1 - Experimental + +Calls [`server.close()`][httpsServerClose] and returns a promise that fulfills when the +server has closed. + ### `server.closeAllConnections()`