Skip to content

Commit

Permalink
http: remove redundant condition
Browse files Browse the repository at this point in the history
`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 <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
lpinca authored and targos committed Aug 19, 2019
1 parent 1011a17 commit 2e50088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/_http_outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2e50088

Please sign in to comment.