|
@ -1086,7 +1086,7 @@ exports._connectionListener = connectionListener; |
|
|
function Agent(options) { |
|
|
function Agent(options) { |
|
|
this.options = options; |
|
|
this.options = options; |
|
|
this.host = options.host; |
|
|
this.host = options.host; |
|
|
this.port = options.port; |
|
|
this.port = options.port || 80; |
|
|
|
|
|
|
|
|
this.queue = []; |
|
|
this.queue = []; |
|
|
this.sockets = []; |
|
|
this.sockets = []; |
|
@ -1356,6 +1356,7 @@ var agents = {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getAgent(host, port) { |
|
|
function getAgent(host, port) { |
|
|
|
|
|
port = port || 80; |
|
|
var id = host + ':' + port; |
|
|
var id = host + ':' + port; |
|
|
var agent = agents[id]; |
|
|
var agent = agents[id]; |
|
|
|
|
|
|
|
|