Skip to content

Commit d3ddee6

Browse files
committed
http: forward-port missing bits from 01e2920
Forward-port the comments from commit 01e2920 (v0.10) to the master branch. Everything else from that patch already exists in master. It didn't merge cleanly because lib/http.js has been split up in several files.
1 parent af1ed99 commit d3ddee6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/_http_incoming.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ IncomingMessage.prototype._read = function(n) {
102102
};
103103

104104

105+
// It's possible that the socket will be destroyed, and removed from
106+
// any messages, before ever calling this. In that case, just skip
107+
// it, since something else is destroying this connection anyway.
105108
IncomingMessage.prototype.destroy = function(error) {
106109
if (this.socket)
107110
this.socket.destroy(error);

lib/_http_outgoing.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ OutgoingMessage.prototype.setTimeout = function(msecs, callback) {
9393
};
9494

9595

96+
// It's possible that the socket will be destroyed, and removed from
97+
// any messages, before ever calling this. In that case, just skip
98+
// it, since something else is destroying this connection anyway.
9699
OutgoingMessage.prototype.destroy = function(error) {
97100
if (this.socket)
98101
this.socket.destroy(error);

0 commit comments

Comments
 (0)