diff options
author | isaacs <i@izs.me> | 2013-02-14 15:37:12 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-02-14 16:03:40 -0800 |
commit | 987338fe31b39b7f57a8f5645593425722ba40af (patch) | |
tree | 70ecae3ae4f5875a0bbe9d7a7ce2ca51493e713f /lib/http.js | |
parent | c9dcf5718cf47322b00f2994797aebb68d7ed0fb (diff) | |
download | android-node-v8-987338fe31b39b7f57a8f5645593425722ba40af.tar.gz android-node-v8-987338fe31b39b7f57a8f5645593425722ba40af.tar.bz2 android-node-v8-987338fe31b39b7f57a8f5645593425722ba40af.zip |
http: Do not let Agent hand out destroyed sockets
Fix #4373
Diffstat (limited to 'lib/http.js')
-rw-r--r-- | lib/http.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http.js b/lib/http.js index 6f3eff1ba8..2446545ba9 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1131,7 +1131,8 @@ function Agent(options) { name += ':' + localAddress; } - if (self.requests[name] && self.requests[name].length) { + if (!socket.destroyed && + self.requests[name] && self.requests[name].length) { self.requests[name].shift().onSocket(socket); if (self.requests[name].length === 0) { // don't leak |