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

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]>
  • Loading branch information
jasnell authored and rvagg committed Aug 15, 2018
1 parent 1be6fb9 commit fcca2f7
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
Original file line number Diff line number Diff line change
Expand Up @@ -1510,10 +1510,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 @@ -1563,14 +1559,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
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,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
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,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 fcca2f7

Please sign in to comment.