-
-
Notifications
You must be signed in to change notification settings - Fork 651
feat(#4230): Implement pingInterval for dispatching PING frames #4296
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
base: main
Are you sure you want to change the base?
Conversation
lib/dispatcher/client-h2.js
Outdated
if (err != null) { | ||
// TODO: should we drop the session? | ||
client[kOnError](err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinkin' twice, I'm over the fence of we should fail rather than actually just emit an event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should drop the sesson if this error.
* @description Time interval between PING frames dispatch | ||
* @default 60000 | ||
*/ | ||
pingInterval?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this type needs a test
lib/dispatcher/client-h2.js
Outdated
session[kHTTP2Session] = null | ||
session[kHTTP2SessionState] = { | ||
ping: { | ||
interval: client[kPingInterval] === 0 ? null : setInterval(onHttp2SendPing, client[kPingInterval], session) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this interval be unref'ed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch; thought I unref'ed, let me adjust it
This relates to...
Closes #4230
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status