Skip to content

Commit 3c8c53f

Browse files
apapirovskiBethGriggs
authored andcommitted
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. Backport-PR-URL: #22850 PR-URL: #21051 Fixes: #20750 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 322f39d commit 3c8c53f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/http2/core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1892,7 +1892,7 @@ class Http2Stream extends Duplex {
18921892
}
18931893

18941894
// TODO(mcollina): remove usage of _*State properties
1895-
if (!this.writable) {
1895+
if (this._writableState.finished) {
18961896
if (!this.readable && this.closed) {
18971897
this.destroy();
18981898
return;

0 commit comments

Comments
 (0)