Skip to content

test,doc: address http2 connection abort/network error handling - #21861

Closed
addaleax wants to merge 4 commits into
nodejs:masterfrom
addaleax:http2-aborted-connection
Closed

test,doc: address http2 connection abort/network error handling#21861
addaleax wants to merge 4 commits into
nodejs:masterfrom
addaleax:http2-aborted-connection

Conversation

@addaleax

Copy link
Copy Markdown
Member
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@addaleaxaddaleax added doc Issues and PRs related to the documentations. test Issues and PRs related to the tests. http2 Issues or PRs related to the http2 subsystem. labels Jul 17, 2018
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threaddoc/api/http2.md Outdated
```

Even though HTTP/2 streams and network sockets are not in a 1:1 correspondence,
a network error will destroy each individual streams and must be handled on the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: streams -> stream?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, done!

@Trott

Copy link
Copy Markdown
Member

@nodejs/http2

Comment threaddoc/api/http2.md Outdated
'content-type': 'text/html',
':status': 200
});
stream.on('error', (error) => console.log(error));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log -> console.error?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe just:

stream.on('error',console.error);

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Switched to the first suggestion – I’d prefer to give a user-defined function here, since that is a bit closer to what one would actually do in real-world code

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 18, 2018
@addaleax

addaleax commented Jul 18, 2018

Copy link
Copy Markdown
MemberAuthor

Comment threaddoc/api/http2.md
'content-type': 'text/html',
':status': 200
});
stream.on('error', (error) => console.error(error));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: how about passing console.error directly? It's already bound. If this is the prevalent usage in the docs, ignore this comment.

@vsemozhetbytvsemozhetbytJul 19, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@addaleax

Copy link
Copy Markdown
MemberAuthor

Landed in daa15b5, 0e4cbde

@addaleax
addaleax deleted the http2-aborted-connection branch July 23, 2018 15:05
addaleax added a commit that referenced this pull request Jul 23, 2018
Refs: #21836
Refs: #21561
PR-URL: #21861
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
addaleax added a commit that referenced this pull request Jul 23, 2018
Fixes: #21836
PR-URL: #21861
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
targos pushed a commit that referenced this pull request Jul 24, 2018
Refs: #21836
Refs: #21561
PR-URL: #21861
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
targos pushed a commit that referenced this pull request Jul 24, 2018
Fixes: #21836
PR-URL: #21861
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
@targostargos mentioned this pull request Jul 31, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.docIssues and PRs related to the documentations.http2Issues or PRs related to the http2 subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@addaleax@nodejs-github-bot@Trott@mcollina@jasnell@lpinca@JungMinu@vsemozhetbyt@trivikr