-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: return type is number #29828
doc: return type is number #29828
Conversation
* `localClose` {number} `true` if this `Http2Stream` has been closed locally. | ||
* `remoteClose` {number} `true` if this `Http2Stream` has been closed | ||
* `localClose` {number} `1` if this `Http2Stream` has been closed locally. | ||
* `remoteClose` {number} `1` if this `Http2Stream` has been closed |
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.
If I'm reading the nghttp2
source correctly, it's 1 if remote peer half closed the given stream, 0 if it did not, and -1 if no such stream exists. Same for localClose
. Is it possible to get -1 for these properties in Node.js?
Once the possible values are determined, tests should be augmented to check those values are returned in the expected situations. That doesn't have to happen in this PR but it would be a nice addition for sure.
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.
@nodejs/http2
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.
Despite my suggested improvement, this is an improvement as it is already so I'm going to land it. My additional suggestions can happen some other time (or not).
This comment has been minimized.
This comment has been minimized.
Landed in 3aeae8d |
PR-URL: nodejs#29828 Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #29828 Reviewed-By: Rich Trott <rtrott@gmail.com>
node/test/parallel/test-http2-session-stream-state.js
Lines 22 to 23 in 88ef086
Type of
localClose
andremoteClose
arenumber
, so I think1
is valid instead oftrue
.Checklist