mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
http: add default argument for Agent.prototype.getName
PR-URL: https://github.com/nodejs/node/pull/41906 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
This commit is contained in:
@@ -217,7 +217,7 @@ Agent.defaultMaxSockets = Infinity;
|
||||
Agent.prototype.createConnection = net.createConnection;
|
||||
|
||||
// Get the key for a given set of request options
|
||||
Agent.prototype.getName = function getName(options) {
|
||||
Agent.prototype.getName = function getName(options = {}) {
|
||||
let name = options.host || 'localhost';
|
||||
|
||||
name += ':';
|
||||
|
||||
Reference in New Issue
Block a user