Skip to content

Commit eafdc74

Browse files
committedSep 27, 2012
[refactor] Pass all options to Agent constructor
1 parent e925e49 commit eafdc74

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed
 

Diff for: ‎lib/node-http-proxy.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,7 @@ exports._getAgent = function _getAgent (options) {
352352
var Agent = options.https ? https.Agent : http.Agent,
353353
agent;
354354

355-
agent = new Agent({
356-
host: options.host,
357-
port: options.port
358-
});
359-
360-
agent.maxSockets = options.maxSockets || maxSockets;
355+
agent = new Agent(options);
361356

362357
return agent;
363358
}
@@ -392,4 +387,4 @@ exports._getBase = function _getBase (options) {
392387
}
393388

394389
return result;
395-
};
390+
};

0 commit comments

Comments
 (0)
Please sign in to comment.