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 560f657

Browse filesBrowse files
陈刚MylesBorins
authored andcommitted
stream: delete redundant code
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 58003d4 commit 560f657
Copy full SHA for 560f657

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Collapse file

‎lib/_stream_writable.js‎

Copy file name to clipboardExpand all lines: lib/_stream_writable.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ Writable.prototype.uncork = function() {
307307

308308
if (!state.writing &&
309309
!state.corked &&
310-
!state.finished &&
311310
!state.bufferProcessing &&
312311
state.bufferedRequest)
313312
clearBuffer(this, state);
@@ -579,7 +578,7 @@ Writable.prototype.end = function(chunk, encoding, cb) {
579578
}
580579

581580
// ignore unnecessary end() calls.
582-
if (!state.ending && !state.finished)
581+
if (!state.ending)
583582
endWritable(this, state, cb);
584583
};
585584

0 commit comments

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