From 72b995d68e7a34c5651aa178e583336e40431e00 Mon Sep 17 00:00:00 2001 From: yusheng chen <55658154+samuel871211@users.noreply.github.com> Date: Sun, 17 May 2026 07:16:42 +0800 Subject: [PATCH] doc: update `Http2Server.close` & `Http2SecureServer.close` Signed-off-by: Yu-Sheng Chen --- doc/api/http2.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index b179743d85a121..171c34417fc0af 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2437,10 +2437,7 @@ added: v8.4.0 * `callback` {Function} -Stops the server from establishing new sessions. This does not prevent new -request streams from being created due to the persistent nature of HTTP/2 -sessions. To gracefully shut down the server, call [`http2session.close()`][] on -all active sessions. +Stops the server from establishing new sessions and streams. If `callback` is provided, it is not invoked until all active sessions have been closed, although the server has already stopped allowing new sessions. See @@ -2721,10 +2718,7 @@ added: v8.4.0 * `callback` {Function} -Stops the server from establishing new sessions. This does not prevent new -request streams from being created due to the persistent nature of HTTP/2 -sessions. To gracefully shut down the server, call [`http2session.close()`][] on -all active sessions. +Stops the server from establishing new sessions and streams. If `callback` is provided, it is not invoked until all active sessions have been closed, although the server has already stopped allowing new sessions. See @@ -5058,7 +5052,6 @@ you need to implement any fall-back behavior yourself. [`http2.Server`]: #class-http2server [`http2.createSecureServer()`]: #http2createsecureserveroptions-onrequesthandler [`http2.createServer()`]: #http2createserveroptions-onrequesthandler -[`http2session.close()`]: #http2sessionclosecallback [`http2stream.pushStream()`]: #http2streampushstreamheaders-options-callback [`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import [`net.Server.close()`]: net.md#serverclosecallback