Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http2: guard against destroy in socket timeout #15106

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Aug 30, 2017

This one is difficult to test reliably, but in certain
instances when timeout is emitted the session may already
be destroyed. Just guard against it.

Fixes: #14964

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

http2

@jasnell jasnell requested a review from mcollina August 30, 2017 23:23
@nodejs-github-bot nodejs-github-bot added the http2 Issues or PRs related to the http2 subsystem. label Aug 30, 2017
@jasnell
Copy link
Member Author

jasnell commented Aug 30, 2017

@AndrewBarba ... can you check to see if this resolves the issue you described in #14964

Sorry it's taken a bit to get this in!

@AndrewBarba
Copy link

No worries! Will test tonight/tomorrow

@mcollina
Copy link
Member

@jasnell I think you can test this by calling session.destroy() after a timeout has been triggered (https://github.com/jasnell/node/blob/a0c42c7159fcfb1d7c66970740cbe233837a4773/lib/internal/http2/core.js#L2292-L2293).

Guard against destroyed session in timeouts and goaway event.

Improve timeout handling a bit.

Fixes: nodejs#14964
@jasnell
Copy link
Member Author

jasnell commented Sep 1, 2017

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

LGTM

jasnell added a commit that referenced this pull request Sep 5, 2017
Guard against destroyed session in timeouts and goaway event.

Improve timeout handling a bit.

PR-URL: #15106
Fixes: #14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@jasnell
Copy link
Member Author

jasnell commented Sep 5, 2017

Landed in 09480a8

@jasnell jasnell closed this Sep 5, 2017
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
Guard against destroyed session in timeouts and goaway event.

Improve timeout handling a bit.

PR-URL: #15106
Fixes: #14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Sep 10, 2017
MylesBorins pushed a commit that referenced this pull request Sep 11, 2017
Guard against destroyed session in timeouts and goaway event.

Improve timeout handling a bit.

PR-URL: #15106
Fixes: #14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
Guard against destroyed session in timeouts and goaway event.

Improve timeout handling a bit.

PR-URL: #15106
Fixes: #14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
addaleax pushed a commit to addaleax/node that referenced this pull request Sep 13, 2017
Guard against destroyed session in timeouts and goaway event.

Improve timeout handling a bit.

PR-URL: nodejs#15106
Fixes: nodejs#14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants