diff options
Diffstat (limited to 'deps/npm/node_modules/request/forever.js')
-rw-r--r-- | deps/npm/node_modules/request/forever.js | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/deps/npm/node_modules/request/forever.js b/deps/npm/node_modules/request/forever.js index ac853c0d28..e6531a21b3 100644 --- a/deps/npm/node_modules/request/forever.js +++ b/deps/npm/node_modules/request/forever.js @@ -1,11 +1,8 @@ module.exports = ForeverAgent -ForeverAgent.SSL = ForeverAgentSSL var util = require('util') , Agent = require('http').Agent , net = require('net') - , tls = require('tls') - , AgentSSL = require('https').Agent function ForeverAgent(options) { var self = this @@ -37,14 +34,12 @@ function ForeverAgent(options) { socket.destroy(); } }) - + self.createConnection = net.createConnection } util.inherits(ForeverAgent, Agent) ForeverAgent.defaultMinSockets = 5 - -ForeverAgent.prototype.createConnection = net.createConnection ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest ForeverAgent.prototype.addRequest = function(req, host, port) { var name = host + ':' + port @@ -87,17 +82,3 @@ ForeverAgent.prototype.removeSocket = function(s, name, host, port) { this.createSocket(name, host, port).emit('free'); } } - -function ForeverAgentSSL (options) { - ForeverAgent.call(this, options) -} -util.inherits(ForeverAgentSSL, ForeverAgent) - -ForeverAgentSSL.prototype.createConnection = createConnectionSSL -ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest - -function createConnectionSSL (port, host, options) { - options.port = port - options.host = host - return tls.connect(options) -} |