summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/_http_agent.js2
-rw-r--r--lib/http.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/_http_agent.js b/lib/_http_agent.js
index cced266988..3af18a051c 100644
--- a/lib/_http_agent.js
+++ b/lib/_http_agent.js
@@ -284,3 +284,5 @@ Agent.prototype.get = function(options, cb) {
req.end();
return req;
};
+
+exports.globalAgent = new Agent();
diff --git a/lib/http.js b/lib/http.js
index 38bfb4b682..f3b6fe77cf 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -42,8 +42,7 @@ exports.STATUS_CODES = server.STATUS_CODES;
var agent = require('_http_agent');
var Agent = exports.Agent = agent.Agent;
-var globalAgent = new Agent();
-exports.globalAgent = globalAgent;
+var globalAgent = exports.globalAgent = agent.globalAgent;
var client = require('_http_client');
var ClientRequest = exports.ClientRequest = client.ClientRequest;