-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: tidying up in core.js #17209
http2: tidying up in core.js #17209
Conversation
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.
Big fan of kUpdateTimer
, should limit the number of accidental timeout bugs. (It's easy to miss calling both _unrefActive
as necessary.)
btw, In a subsequent PR I'm going to be renaming the |
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.
two small copy paste errors :)
lib/internal/http2/core.js
Outdated
@@ -366,7 +366,8 @@ function onSelectPadding(fn) { | |||
// will be deferred until the socket is ready to go. | |||
function requestOnConnect(headers, options) { | |||
const session = this[kSession]; | |||
debug(`[${sessionName(session[kType])}] connected.. initializing request`); | |||
debug(`HttpSession ${sessionName(session[kType])}: connected, ` + |
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.
Http2Session
lib/internal/http2/core.js
Outdated
@@ -1004,13 +1011,15 @@ class ClientHttp2Session extends Http2Session { | |||
const state = this[kState]; | |||
if (state.destroyed || state.destroying) | |||
throw new errors.Error('ERR_HTTP2_INVALID_SESSION'); | |||
debug(`[${sessionName(this[kType])}] initiating request`); | |||
_unrefActive(this); | |||
debug(`HttpSession ${sessionName(this[kType])}: initiating request`); |
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.
Http2Session
85c0642
to
46827db
Compare
@maclover7 ... fixed :-) |
osx and freebsd ci's failed because I pushed a new commit before those could run. Will re-run those soon |
* fixup js debug messages * simplify and improve rstStream * improve and simplify _read * simplify and improve priority * simplify on ready a bit * simplify and improve respond/push * reduce duplication with _unrefActive * simplify stream close handling PR-URL: #17209 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Landed in 9d87082 |
* fixup js debug messages * simplify and improve rstStream * improve and simplify _read * simplify and improve priority * simplify on ready a bit * simplify and improve respond/push * reduce duplication with _unrefActive * simplify stream close handling PR-URL: #17209 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
* fixup js debug messages * simplify and improve rstStream * improve and simplify _read * simplify and improve priority * simplify on ready a bit * simplify and improve respond/push * reduce duplication with _unrefActive * simplify stream close handling PR-URL: #17209 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
* fixup js debug messages * simplify and improve rstStream * improve and simplify _read * simplify and improve priority * simplify on ready a bit * simplify and improve respond/push * reduce duplication with _unrefActive * simplify stream close handling PR-URL: #17209 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
* fixup js debug messages * simplify and improve rstStream * improve and simplify _read * simplify and improve priority * simplify on ready a bit * simplify and improve respond/push * reduce duplication with _unrefActive * simplify stream close handling PR-URL: #17209 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
A number of cleanups and improvements in core.js
Getting these out of the way before working on a larger cleanup around the lifecycle and error handling in Http2Stream and Http2Session
ping @nodejs/http2
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
http2