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 4ddb263 commit fe83419Copy full SHA for fe83419
lib/internal/streams/writable.js
@@ -1091,7 +1091,7 @@ Writable.prototype.destroy = function(err, cb) {
1091
const state = this._writableState;
1092
1093
// Invoke pending callbacks.
1094
- if ((state[kState] & (kBuffered | kOnFinished | kDestroyed)) !== kDestroyed) {
+ if ((state[kState] & (kBuffered | kOnFinished)) !== 0 && (state[kState] & kDestroyed) === 0) {
1095
process.nextTick(errorBuffer, state);
1096
}
1097
0 commit comments