Skip to content

Commit 5abb609

Browse files
jasnellMylesBorins
authored andcommitted
http2: cleanup Http2Stream/Http2Session destroy
Backport-PR-URL: #18050 PR-URL: #17406 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> 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 f699a74 commit 5abb609

File tree

146 files changed

+2638
-2692
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

+2638
-2692
lines changed

doc/api/errors.md

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

761+
<a id="ERR_HTTP2_ALREADY_SHUTDOWN"></a>
762+
### ERR_HTTP2_ALREADY_SHUTDOWN
763+
764+
Occurs with multiple attempts to shutdown an HTTP/2 session.
765+
761766
<a id="ERR_HTTP2_CONNECT_AUTHORITY"></a>
762767
### ERR_HTTP2_CONNECT_AUTHORITY
763768

@@ -781,6 +786,12 @@ forbidden.
781786

782787
A failure occurred sending an individual frame on the HTTP/2 session.
783788

789+
<a id="ERR_HTTP2_GOAWAY_SESSION"></a>
790+
### ERR_HTTP2_GOAWAY_SESSION
791+
792+
New HTTP/2 Streams may not be opened after the `Http2Session` has received a
793+
`GOAWAY` frame from the connected peer.
794+
784795
<a id="ERR_HTTP2_HEADER_REQUIRED"></a>
785796
### ERR_HTTP2_HEADER_REQUIRED
786797

@@ -920,6 +931,11 @@ client.
920931
An attempt was made to use the `Http2Stream.prototype.responseWithFile()` API to
921932
send something other than a regular file.
922933

934+
<a id="ERR_HTTP2_SESSION_ERROR"></a>
935+
### ERR_HTTP2_SESSION_ERROR
936+
937+
The `Http2Session` closed with a non-zero error code.
938+
923939
<a id="ERR_HTTP2_SOCKET_BOUND"></a>
924940
### ERR_HTTP2_SOCKET_BOUND
925941

@@ -937,10 +953,11 @@ Use of the `101` Informational status code is forbidden in HTTP/2.
937953
An invalid HTTP status code has been specified. Status codes must be an integer
938954
between `100` and `599` (inclusive).
939955

940-
<a id="ERR_HTTP2_STREAM_CLOSED"></a>
941-
### ERR_HTTP2_STREAM_CLOSED
956+
<a id="ERR_HTTP2_STREAM_CANCEL"></a>
957+
### ERR_HTTP2_STREAM_CANCEL
942958

943-
An action was performed on an HTTP/2 Stream that had already been closed.
959+
An `Http2Stream` was destroyed before any data was transmitted to the connected
960+
peer.
944961

945962
<a id="ERR_HTTP2_STREAM_ERROR"></a>
946963
### ERR_HTTP2_STREAM_ERROR

0 commit comments

Comments
 (0)