Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 32fdae2

Browse files
committed
http: Fix overlooked agent.globalAgent export
Noticed by @bnoordhuis in #5991 (comment)
1 parent 222e523 commit 32fdae2

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/_http_agent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,3 +284,5 @@ Agent.prototype.get = function(options, cb) {
284284
req.end();
285285
return req;
286286
};
287+
288+
exports.globalAgent = new Agent();

lib/http.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ exports.STATUS_CODES = server.STATUS_CODES;
4242

4343
var agent = require('_http_agent');
4444
var Agent = exports.Agent = agent.Agent;
45-
var globalAgent = new Agent();
46-
exports.globalAgent = globalAgent;
45+
var globalAgent = exports.globalAgent = agent.globalAgent;
4746

4847
var client = require('_http_client');
4948
var ClientRequest = exports.ClientRequest = client.ClientRequest;

0 commit comments

Comments
 (0)