Uh oh!
There was an error while loading. Please reload this page.
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.
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.
Trott
left a comment
There was a problem hiding this comment.
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.
Trott
commented
Oct 11, 2019
Trott
commented
Oct 11, 2019
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
localCloseandremoteClosearenumber, so I think1is valid instead oftrue.Checklist