http: Proper KeepAlive behavior
authorisaacs <i@izs.me>
Wed, 15 May 2013 22:10:53 +0000 (15:10 -0700)
committerisaacs <i@izs.me>
Wed, 10 Jul 2013 05:31:11 +0000 (22:31 -0700)
commit9fc9b87472806147b83c24d85b303c4f75d3021c
tree0d61c630a820b01c681261881119314668c205cd
parent6176e49181fcf81eb22919e2880b503d3f70e738
http: Proper KeepAlive behavior

Instead of destroying sockets when there are no pending requests, put
them in a freeSockets list, and unref() them so that they do not keep
the event loop open.

Also, set the default max sockets to Infinity, to prevent the awful
surprising deadlocks that happen when more connections are made.
lib/_http_agent.js
test/simple/test-http-client-abort.js
test/simple/test-http-keepalive-client.js [new file with mode: 0644]