diff options
author | isaacs <i@izs.me> | 2012-05-01 14:26:18 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-05-01 14:26:18 -0700 |
commit | bfe9cdb7f2f9b90c95a221dcdce29263f0da5c75 (patch) | |
tree | 6d4d6ed0bbfe1a918348e56d780debb1f9e1efd4 /lib | |
parent | acf19500eed8805cd038e38c14d692f5684ea375 (diff) | |
download | android-node-v8-bfe9cdb7f2f9b90c95a221dcdce29263f0da5c75.tar.gz android-node-v8-bfe9cdb7f2f9b90c95a221dcdce29263f0da5c75.tar.bz2 android-node-v8-bfe9cdb7f2f9b90c95a221dcdce29263f0da5c75.zip |
Null references to request object on socket errors.
Regarding #3199 and #3179 and issues seen in production.
Hopefully this fixes them.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/http.js b/lib/http.js index 4f7aa0a00a..3986709c2a 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1209,6 +1209,13 @@ ClientRequest.prototype.onSocket = function(socket) { // fire on the request. req.emit('error', createHangUpError()); } + + // Nothing more to be done with this req, since the socket + // is closed, and we've emitted the appropriate abort/end/close/error + // events. Disavow all knowledge, and break the references to + // the variables trapped by closures and on the socket object. + req = null; + socket._httpMessage = null; } socket.on('close', closeListener); |