Skip to content
Permalink
Browse files

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: #29078
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information...
lpinca authored and targos committed Aug 10, 2019
1 parent 1011a17 commit 2e5008848efdc0b6210a59f7356b0df23efee9aa
Showing with 1 addition and 1 deletion.
  1. +1 −1 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);

0 comments on commit 2e50088

Please sign in to comment.
You can’t perform that action at this time.