Skip to content

Commit c9eb300

Browse files
committed
default to NGHTTP2_INTERNAL_ERROR
1 parent 8381e02 commit c9eb300

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

lib/internal/http2/core.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3313,9 +3313,7 @@ function socketOnClose() {
33133313
code = null;
33143314
}
33153315

3316-
const defaultCode = session[kType] === NGHTTP2_SESSION_SERVER ?
3317-
NGHTTP2_CANCEL :
3318-
NGHTTP2_INTERNAL_ERROR;
3316+
const defaultCode = NGHTTP2_INTERNAL_ERROR;
33193317

33203318
const closeStream = (stream) => {
33213319
if (code === null) {

test/parallel/test-http2-respond-with-file-connection-abort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ server.on('stream', common.mustCall((stream) => {
1616
stream.on('error', common.expectsError({
1717
code: 'ERR_HTTP2_STREAM_ERROR',
1818
name: 'Error',
19-
message: 'Stream closed with error code NGHTTP2_CANCEL'
19+
message: 'Stream closed with error code NGHTTP2_INTERNAL_ERROR'
2020
}));
2121
stream.respondWithFile(process.execPath, {
2222
[HTTP2_HEADER_CONTENT_TYPE]: 'application/octet-stream'

test/parallel/test-http2-server-socket-destroy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function onStream(stream) {
3636
stream.once('error', common.expectsError({
3737
name: 'Error',
3838
code: 'ERR_HTTP2_STREAM_ERROR',
39-
message: 'Stream closed with error code NGHTTP2_CANCEL'
39+
message: 'Stream closed with error code NGHTTP2_INTERNAL_ERROR'
4040
}));
4141

4242
// Always send RST.

0 commit comments

Comments
 (0)