From 32fdae2ca3bd4df057ae01b7cd78961968fa0fd0 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 5 Aug 2013 12:33:19 -0700 Subject: [PATCH] http: Fix overlooked agent.globalAgent export Noticed by @bnoordhuis in https://github.com/joyent/node/pull/5991#discussion_r5575946 --- lib/_http_agent.js | 2 ++ lib/http.js | 3 +-- 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;