Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
http2: fix premature destroy
Check stream._writableState.finished instead of stream.writable
as the latter can lead to premature calls to destroy and dropped
writes on busy processes.
  • Loading branch information
apapirovski committed May 31, 2018
commit e06612c4ddd9929be8543ee77b5198b4905e0e91
2 changes: 1 addition & 1 deletion lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1891,7 +1891,7 @@ class Http2Stream extends Duplex {
}

// TODO(mcollina): remove usage of _*State properties
if (!this.writable) {
if (this._writableState.finished) {
if (!this.readable && this.closed) {
this.destroy();
return;
Expand Down