http2: remove streamError from docs

`streamError` was removed quite some time ago but the docs and
code comments weren't updated. Fix that.

Fixes: https://github.com/nodejs/node/issues/20211

PR-URL: https://github.com/nodejs/node/pull/22246
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
James M Snell 2018-08-10 11:16:45 -07:00
parent ec8f31dace
commit c8aa83c6dd
3 changed files with 2 additions and 17 deletions

View File

@ -1510,10 +1510,6 @@ added: v8.4.0
* Extends: {net.Server} * Extends: {net.Server}
In `Http2Server`, there are no `'clientError'` events as there are in
HTTP1. However, there are `'sessionError'`, and `'streamError'` events for
errors emitted on the socket, or from `Http2Session` or `Http2Stream` instances.
#### Event: 'checkContinue' #### Event: 'checkContinue'
<!-- YAML <!-- YAML
added: v8.5.0 added: v8.5.0
@ -1563,14 +1559,6 @@ added: v8.4.0
The `'sessionError'` event is emitted when an `'error'` event is emitted by The `'sessionError'` event is emitted when an `'error'` event is emitted by
an `Http2Session` object associated with the `Http2Server`. an `Http2Session` object associated with the `Http2Server`.
#### Event: 'streamError'
<!-- YAML
added: v8.5.0
-->
If a `ServerHttp2Stream` emits an `'error'` event, it will be forwarded here.
The stream will already be destroyed when this event is triggered.
#### Event: 'stream' #### Event: 'stream'
<!-- YAML <!-- YAML
added: v8.4.0 added: v8.4.0

View File

@ -115,9 +115,7 @@ function onStreamError(error) {
// //
// errors in compatibility mode are // errors in compatibility mode are
// not forwarded to the request // not forwarded to the request
// and response objects. However, // and response objects.
// they are forwarded to 'streamError'
// on the server by Http2Stream
} }
function onRequestPause() { function onRequestPause() {

View File

@ -7,8 +7,7 @@ const http2 = require('http2');
const Countdown = require('../common/countdown'); const Countdown = require('../common/countdown');
// Check that destroying the Http2ServerResponse stream produces // Check that destroying the Http2ServerResponse stream produces
// the expected result, including the ability to throw an error // the expected result.
// which is emitted on server.streamError
const errors = [ const errors = [
'test-error', 'test-error',