diff options
author | isaacs <i@izs.me> | 2012-05-01 14:26:18 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-05-04 14:27:24 -0700 |
commit | 9164fa6aaaa6e483c570d34109bcb06736ef5750 (patch) | |
tree | 56137b54d89e30be08f9782d119b7c0aae3f14d2 /lib | |
parent | ebbd4039bceb82e47573bdb213d1ec015ad67b61 (diff) | |
download | android-node-v8-9164fa6aaaa6e483c570d34109bcb06736ef5750.tar.gz android-node-v8-9164fa6aaaa6e483c570d34109bcb06736ef5750.tar.bz2 android-node-v8-9164fa6aaaa6e483c570d34109bcb06736ef5750.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 a3f7118b8e..be2af549d9 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1361,6 +1361,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); |