Skip to content

Commit

Permalink
http2: remove streamError from docs
Browse files Browse the repository at this point in the history
`streamError` was removed quite some time ago but the docs and
code comments weren't updated. Fix that.

Fixes: #20211

Backport-PR-URL: #22850
PR-URL: #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>
  • Loading branch information
jasnell authored and BethGriggs committed Oct 16, 2018
1 parent 7ea08ee commit f2f66b4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
12 changes: 0 additions & 12 deletions doc/api/http2.md
Expand Up @@ -1505,10 +1505,6 @@ added: v8.4.0

* 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'
<!-- YAML
added: v8.5.0
Expand Down Expand Up @@ -1558,14 +1554,6 @@ added: v8.4.0
The `'sessionError'` event is emitted when an `'error'` event is emitted by
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'
<!-- YAML
added: v8.4.0
Expand Down
4 changes: 1 addition & 3 deletions lib/internal/http2/compat.js
Expand Up @@ -103,9 +103,7 @@ function onStreamError(error) {
//
// errors in compatibility mode are
// not forwarded to the request
// and response objects. However,
// they are forwarded to 'streamError'
// on the server by Http2Stream
// and response objects.
}

function onRequestPause() {
Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-http2-compat-serverresponse-destroy.js
Expand Up @@ -8,8 +8,7 @@ const http2 = require('http2');
const Countdown = require('../common/countdown');

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

const errors = [
'test-error',
Expand Down

0 comments on commit f2f66b4

Please sign in to comment.