Skip to content

http2: guard against destroy in socket timeout - #15106

Closed
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:destroy-guard-in-timeout
Closed

http2: guard against destroy in socket timeout#15106
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:destroy-guard-in-timeout

Conversation

@jasnell

Copy link
Copy Markdown
Member

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 mcollinaAugust 30, 2017 23:23
@nodejs-github-botnodejs-github-bot added the http2 Issues or PRs related to the http2 subsystem. label Aug 30, 2017
@jasnell

Copy link
Copy Markdown
MemberAuthor

@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
Copy Markdown

No worries! Will test tonight/tomorrow

@mcollina

Copy link
Copy Markdown
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
jasnellforce-pushed the destroy-guard-in-timeout branch from 7792388 to 6930ac7CompareAugust 31, 2017 05:09
@jasnell

Copy link
Copy Markdown
MemberAuthor

@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

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: #15106Fixes: #14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@jasnell

Copy link
Copy Markdown
MemberAuthor

Landed in 09480a8

@jasnelljasnell 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: #15106Fixes: #14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@MylesBorinsMylesBorins 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: #15106Fixes: #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: #15106Fixes: #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#15106Fixes: nodejs#14964
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

http2Issues or PRs related to the http2 subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@jasnell@AndrewBarba@mcollina@MylesBorins@nodejs-github-bot