We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eac9cc5 commit 360f5d9Copy full SHA for 360f5d9
lib/internal/streams/writable.js
@@ -1105,7 +1105,7 @@ Writable.prototype.destroy = function(err, cb) {
1105
const state = this._writableState;
1106
1107
// Invoke pending callbacks.
1108
- if ((state[kState] & (kBuffered | kOnFinished | kDestroyed)) !== kDestroyed) {
+ if ((state[kState] & (kBuffered | kOnFinished)) !== 0 && (state[kState] & kDestroyed) === 0) {
1109
process.nextTick(errorBuffer, state);
1110
}
1111
0 commit comments