Skip to content

Commit fcca2f7

Browse files
jasnellrvagg
authored andcommitted
http2: remove streamError from docs
`streamError` was removed quite some time ago but the docs and code comments weren't updated. Fix that. Fixes: #20211 PR-URL: #22246 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 1be6fb9 commit fcca2f7

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

doc/api/http2.md

-12
Original file line numberDiff line numberDiff line change
@@ -1510,10 +1510,6 @@ added: v8.4.0
15101510

15111511
* Extends: {net.Server}
15121512

1513-
In `Http2Server`, there are no `'clientError'` events as there are in
1514-
HTTP1. However, there are `'sessionError'`, and `'streamError'` events for
1515-
errors emitted on the socket, or from `Http2Session` or `Http2Stream` instances.
1516-
15171513
#### Event: 'checkContinue'
15181514
<!-- YAML
15191515
added: v8.5.0
@@ -1563,14 +1559,6 @@ added: v8.4.0
15631559
The `'sessionError'` event is emitted when an `'error'` event is emitted by
15641560
an `Http2Session` object associated with the `Http2Server`.
15651561

1566-
#### Event: 'streamError'
1567-
<!-- YAML
1568-
added: v8.5.0
1569-
-->
1570-
1571-
If a `ServerHttp2Stream` emits an `'error'` event, it will be forwarded here.
1572-
The stream will already be destroyed when this event is triggered.
1573-
15741562
#### Event: 'stream'
15751563
<!-- YAML
15761564
added: v8.4.0

lib/internal/http2/compat.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ function onStreamError(error) {
115115
//
116116
// errors in compatibility mode are
117117
// not forwarded to the request
118-
// and response objects. However,
119-
// they are forwarded to 'streamError'
120-
// on the server by Http2Stream
118+
// and response objects.
121119
}
122120

123121
function onRequestPause() {

test/parallel/test-http2-compat-serverresponse-destroy.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ const http2 = require('http2');
77
const Countdown = require('../common/countdown');
88

99
// Check that destroying the Http2ServerResponse stream produces
10-
// the expected result, including the ability to throw an error
11-
// which is emitted on server.streamError
10+
// the expected result.
1211

1312
const errors = [
1413
'test-error',

0 commit comments

Comments
 (0)