Skip to content

Commit 6bdbb28

Browse files
committed
http2: cleanup Http2Stream/Http2Session destroy
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 9312872 commit 6bdbb28

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

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,11 @@ Status code was outside the regular status code range (100-999).
810810
The `Trailer` header was set even though the transfer encoding does not support
811811
that.
812812

813+
<a id="ERR_HTTP2_ALREADY_SHUTDOWN"></a>
814+
### ERR_HTTP2_ALREADY_SHUTDOWN
815+
816+
Occurs with multiple attempts to shutdown an HTTP/2 session.
817+
813818
<a id="ERR_HTTP2_CONNECT_AUTHORITY"></a>
814819
### ERR_HTTP2_CONNECT_AUTHORITY
815820

@@ -833,6 +838,12 @@ forbidden.
833838

834839
A failure occurred sending an individual frame on the HTTP/2 session.
835840

841+
<a id="ERR_HTTP2_GOAWAY_SESSION"></a>
842+
### ERR_HTTP2_GOAWAY_SESSION
843+
844+
New HTTP/2 Streams may not be opened after the `Http2Session` has received a
845+
`GOAWAY` frame from the connected peer.
846+
836847
<a id="ERR_HTTP2_HEADER_REQUIRED"></a>
837848
### ERR_HTTP2_HEADER_REQUIRED
838849

@@ -972,6 +983,11 @@ client.
972983
An attempt was made to use the `Http2Stream.prototype.responseWithFile()` API to
973984
send something other than a regular file.
974985

986+
<a id="ERR_HTTP2_SESSION_ERROR"></a>
987+
### ERR_HTTP2_SESSION_ERROR
988+
989+
The `Http2Session` closed with a non-zero error code.
990+
975991
<a id="ERR_HTTP2_SOCKET_BOUND"></a>
976992
### ERR_HTTP2_SOCKET_BOUND
977993

@@ -989,10 +1005,11 @@ Use of the `101` Informational status code is forbidden in HTTP/2.
9891005
An invalid HTTP status code has been specified. Status codes must be an integer
9901006
between `100` and `599` (inclusive).
9911007

992-
<a id="ERR_HTTP2_STREAM_CLOSED"></a>
993-
### ERR_HTTP2_STREAM_CLOSED
1008+
<a id="ERR_HTTP2_STREAM_CANCEL"></a>
1009+
### ERR_HTTP2_STREAM_CANCEL
9941010

995-
An action was performed on an HTTP/2 Stream that had already been closed.
1011+
An `Http2Stream` was destroyed before any data was transmitted to the connected
1012+
peer.
9961013

9971014
<a id="ERR_HTTP2_STREAM_ERROR"></a>
9981015
### ERR_HTTP2_STREAM_ERROR

0 commit comments

Comments
 (0)