Skip to content

Commit fc40b7d

Browse files
jasnellMylesBorins
authored andcommitted
http2: cleanup Http2Stream/Http2Session destroy
Backport-PR-URL: #18050 Backport-PR-URL: #20456 PR-URL: #17406 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> This is a significant cleanup and refactoring of the cleanup/close/destroy logic for Http2Stream and Http2Session. There are significant changes here in the timing and ordering of cleanup logic, JS apis. and various related necessary edits.
1 parent 1d65f2b commit fc40b7d

File tree

146 files changed

+2640
-2696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+2640
-2696
lines changed

doc/api/errors.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,11 @@ Status code was outside the regular status code range (100-999).
638638
The `Trailer` header was set even though the transfer encoding does not support
639639
that.
640640

641+
<a id="ERR_HTTP2_ALREADY_SHUTDOWN"></a>
642+
### ERR_HTTP2_ALREADY_SHUTDOWN
643+
644+
Occurs with multiple attempts to shutdown an HTTP/2 session.
645+
641646
<a id="ERR_HTTP2_CONNECT_AUTHORITY"></a>
642647
### ERR_HTTP2_CONNECT_AUTHORITY
643648

@@ -661,6 +666,12 @@ forbidden.
661666

662667
A failure occurred sending an individual frame on the HTTP/2 session.
663668

669+
<a id="ERR_HTTP2_GOAWAY_SESSION"></a>
670+
### ERR_HTTP2_GOAWAY_SESSION
671+
672+
New HTTP/2 Streams may not be opened after the `Http2Session` has received a
673+
`GOAWAY` frame from the connected peer.
674+
664675
<a id="ERR_HTTP2_HEADER_REQUIRED"></a>
665676
### ERR_HTTP2_HEADER_REQUIRED
666677

@@ -800,6 +811,11 @@ client.
800811
An attempt was made to use the `Http2Stream.prototype.responseWithFile()` API to
801812
send something other than a regular file.
802813

814+
<a id="ERR_HTTP2_SESSION_ERROR"></a>
815+
### ERR_HTTP2_SESSION_ERROR
816+
817+
The `Http2Session` closed with a non-zero error code.
818+
803819
<a id="ERR_HTTP2_SOCKET_BOUND"></a>
804820
### ERR_HTTP2_SOCKET_BOUND
805821

@@ -817,10 +833,11 @@ Use of the `101` Informational status code is forbidden in HTTP/2.
817833
An invalid HTTP status code has been specified. Status codes must be an integer
818834
between `100` and `599` (inclusive).
819835

820-
<a id="ERR_HTTP2_STREAM_CLOSED"></a>
821-
### ERR_HTTP2_STREAM_CLOSED
836+
<a id="ERR_HTTP2_STREAM_CANCEL"></a>
837+
### ERR_HTTP2_STREAM_CANCEL
822838

823-
An action was performed on an HTTP/2 Stream that had already been closed.
839+
An `Http2Stream` was destroyed before any data was transmitted to the connected
840+
peer.
824841

825842
<a id="ERR_HTTP2_STREAM_ERROR"></a>
826843
### ERR_HTTP2_STREAM_ERROR

0 commit comments

Comments
 (0)