Skip to content

http2: handle graceful close#2050

Merged
mcollina merged 2 commits intomasterfrom
add-http2-session-timeout
Jan 23, 2020
Merged

http2: handle graceful close#2050
mcollina merged 2 commits intomasterfrom
add-http2-session-timeout

Conversation

@mcollina
Copy link
Copy Markdown
Member

This commit adds an option http2SessionTimeout to be able to gracefully
closing an http2 server. This is analogous to the 5000ms timeout of
keepalive connections.

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

@mcollina mcollina force-pushed the add-http2-session-timeout branch from 735d1f0 to 4823edd Compare January 19, 2020 23:40
This commit adds an option http2SessionTimeout to be able to gracefully
closing an http2 server. This is analogous to the 5000ms timeout of
keepalive connections.
@mcollina mcollina force-pushed the add-http2-session-timeout branch from 4823edd to 6801443 Compare January 20, 2020 12:24
Copy link
Copy Markdown
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

LGTM

})

// Skipped because there is likely a bug on Node 8.
t.test('http/2 closes successfully with async await', { skip: semver.lt(process.versions.node, '10.15.0') }, async t => {
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.

Could we add a test also that check session.on('timeout', () => { t.pass('timeout out reached') }); ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Copy Markdown
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

semver-minor Issue or PR that should land as semver minor v2.x Issue or pr related to Fastify v2 v3.x Issue or pr related to Fastify v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants