summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2018-03-08 16:22:23 +0100
committerMatteo Collina <hello@matteocollina.com>2018-03-12 09:36:31 +0100
commit8403f00dc3e8f1c3c5cae4c4aec2eb10733cc15c (patch)
treed210f89a620653e6c1ab7e7026dbb840a1e411d3 /lib
parent33e63fe64f238227481b83fc401a1a2371013995 (diff)
downloadandroid-node-v8-8403f00dc3e8f1c3c5cae4c4aec2eb10733cc15c.tar.gz
android-node-v8-8403f00dc3e8f1c3c5cae4c4aec2eb10733cc15c.tar.bz2
android-node-v8-8403f00dc3e8f1c3c5cae4c4aec2eb10733cc15c.zip
http2: fixes error handling
There should be no default error handling when using Http2Stream. All errors will end up in `'streamError'` on the server anyway, but they are emitted on `'stream'` as well, otherwise some error conditions are impossible to debug. See: https://github.com/nodejs/node/pull/14991 PR-URL: https://github.com/nodejs/node/pull/19232 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/http2/core.js7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
index c764cd0297..2a4ef0421f 100644
--- a/lib/internal/http2/core.js
+++ b/lib/internal/http2/core.js
@@ -2073,19 +2073,12 @@ function afterOpen(session, options, headers, streamOptions, err, fd) {
headers, streamOptions));
}
-function streamOnError(err) {
- // we swallow the error for parity with HTTP1
- // all the errors that ends here are not critical for the project
-}
-
-
class ServerHttp2Stream extends Http2Stream {
constructor(session, handle, id, options, headers) {
super(session, options);
this[kInit](id, handle);
this[kProtocol] = headers[HTTP2_HEADER_SCHEME];
this[kAuthority] = headers[HTTP2_HEADER_AUTHORITY];
- this.on('error', streamOnError);
}
// true if the remote peer accepts push streams