Skip to content

Commit 9afee67

Browse files
committed
http: Check this.connection before using it
Refer: nodejs/node-v0.x-archive#25670 PR-URL: #2172 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brendan Ashworth <[email protected]>
1 parent ac7d3fa commit 9afee67

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/_http_outgoing.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,9 @@ OutgoingMessage.prototype.end = function(data, encoding, callback) {
571571
// There is the first message on the outgoing queue, and we've sent
572572
// everything to the socket.
573573
debug('outgoing message end.');
574-
if (this.output.length === 0 && this.connection._httpMessage === this) {
574+
if (this.output.length === 0 &&
575+
this.connection &&
576+
this.connection._httpMessage === this) {
575577
this._finish();
576578
}
577579

0 commit comments

Comments
 (0)