Skip to content

Commit 2e50088

Browse files
lpincatargos
authored andcommitted
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 1011a17 commit 2e50088

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/_http_outgoing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function _writeRaw(data, encoding, callback) {
285285
encoding = null;
286286
}
287287

288-
if (conn && conn._httpMessage === this && conn.writable && !conn.destroyed) {
288+
if (conn && conn._httpMessage === this && conn.writable) {
289289
// There might be pending data in the this.output buffer.
290290
if (this.outputData.length) {
291291
this._flushOutput(conn);

0 commit comments

Comments
 (0)