Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d8942f8

Browse filesBrowse files
zero1fivetargos
authored andcommitted
http2: use writableFinished instead of _writableState
PR-URL: #28007 Refs: #445 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 1650bcf commit d8942f8
Copy full SHA for d8942f8

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Collapse file

‎lib/internal/http2/core.js‎

Copy file name to clipboardExpand all lines: lib/internal/http2/core.js
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ function closeStream(stream, code, rstStreamStatus = kSubmitRstStream) {
15601560
stream.setTimeout(0);
15611561
stream.removeAllListeners('timeout');
15621562

1563-
const { ending, finished } = stream._writableState;
1563+
const { ending } = stream._writableState;
15641564

15651565
if (!ending) {
15661566
// If the writable side of the Http2Stream is still open, emit the
@@ -1576,7 +1576,7 @@ function closeStream(stream, code, rstStreamStatus = kSubmitRstStream) {
15761576

15771577
if (rstStreamStatus !== kNoRstStream) {
15781578
const finishFn = finishCloseStream.bind(stream, code);
1579-
if (!ending || finished || code !== NGHTTP2_NO_ERROR ||
1579+
if (!ending || stream.writableFinished || code !== NGHTTP2_NO_ERROR ||
15801580
rstStreamStatus === kForceRstStream)
15811581
finishFn();
15821582
else
@@ -1986,8 +1986,7 @@ class Http2Stream extends Duplex {
19861986
return;
19871987
}
19881988

1989-
// TODO(mcollina): remove usage of _*State properties
1990-
if (this._writableState.finished) {
1989+
if (this.writableFinished) {
19911990
if (!this.readable && this.closed) {
19921991
this.destroy();
19931992
return;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.