http: cleanup freeSockets when socket destroyed
authorfengmk2 <fengmk2@gmail.com>
Wed, 6 Nov 2013 11:58:03 +0000 (19:58 +0800)
committerFedor Indutny <fedor.indutny@gmail.com>
Thu, 7 Nov 2013 07:42:41 +0000 (11:42 +0400)
commit1ce5db4d95ef8d522592db33a131780754935fc3
tree34e70ab2c92499a6d9cf12c8a757df4889b411cf
parent60958d235d6ad789b034a67a528a7d680ac1c727
http: cleanup freeSockets when socket destroyed

If the socket was destroyed, we need to remove it from the agent's
`freeSockets` list, otherwise dead socket could be reused by new
request.
lib/_http_agent.js
test/simple/test-http-agent-keepalive.js [new file with mode: 0644]