From ad63ee13a20484ed277eb31fb568f1ac74ae17fd 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. --- 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 e10f068f325959..a38a32181f288d 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -267,7 +267,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);