-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
1 changed file
with
1 addition
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -297,7 +297,6 @@ Writable.prototype.uncork = function() { | |
|
||
if (!state.writing && | ||
!state.corked && | ||
!state.finished && | ||
!state.bufferProcessing && | ||
state.bufferedRequest) | ||
clearBuffer(this, state); | ||
|
@@ -569,7 +568,7 @@ Writable.prototype.end = function(chunk, encoding, cb) { | |
} | ||
|
||
// ignore unnecessary end() calls. | ||
if (!state.ending && !state.finished) | ||
if (!state.ending) | ||
endWritable(this, state, cb); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mcollina
Member
|
||
}; | ||
|
||
|
Shouldn't the callback be called here, if
state.ending
istrue
?