From 2e5008848efdc0b6210a59f7356b0df23efee9aa Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sat, 10 Aug 2019 19:16:53 +0200 Subject: [PATCH] http: remove redundant condition `conn.destroyed` is guaranteed to be `false` because a previous `if` statement already handles the case where `conn && conn.destroyed` evaluates to `true` returning `false` in that case. PR-URL: https://github.com/nodejs/node/pull/29078 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- lib/_http_outgoing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 9477a9b7f70b6e..cdd8fff0561794 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -285,7 +285,7 @@ function _writeRaw(data, encoding, callback) { encoding = null; } - if (conn && conn._httpMessage === this && conn.writable && !conn.destroyed) { + if (conn && conn._httpMessage === this && conn.writable) { // There might be pending data in the this.output buffer. if (this.outputData.length) { this._flushOutput(conn);