mikeal/request — pull request #1197 by FredKSchott (2014-10-21 02:35:16+00:00)
Title: Clean up some code around setting the agent

Some small cleanup around setting and getting the http/https agent. Looks like maxSockets weren't getting properly set when outside of init, so I moved that logic into `getAgent()`, which has been renamed to `_chooseAgent()` since it doesn't literally get the current agent, as the name suggests. (Underscore added since it looks like it should only be called privately) (happy to bikeshed on a name, I'm not particularly tied to `_chooseAgent` and I'm sure there are better names out there)

@mikeal I'd want your sign off on this since it's touching some older code