Skip to content

Commit

Permalink
http: name anonymous functions
Browse files Browse the repository at this point in the history
Ref: #8913
  • Loading branch information
maasencioh committed Oct 12, 2016
1 parent 774d737 commit 2e433da
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/_http_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Agent.defaultMaxSockets = Infinity;
Agent.prototype.createConnection = net.createConnection;

// Get the key for a given set of request options
Agent.prototype.getName = function(options) {
Agent.prototype.getName = function getName(options) {
var name = options.host || 'localhost';

name += ':';
Expand All @@ -110,7 +110,7 @@ Agent.prototype.getName = function(options) {
return name;
};

Agent.prototype.addRequest = function(req, options) {
Agent.prototype.addRequest = function addRequest(req, options) {
// Legacy API: addRequest(req, host, port, localAddress)
if (typeof options === 'string') {
options = {
Expand Down Expand Up @@ -173,7 +173,7 @@ Agent.prototype.addRequest = function(req, options) {
}
};

Agent.prototype.createSocket = function(req, options, cb) {
Agent.prototype.createSocket = function createSocket(req, options, cb) {
var self = this;
options = util._extend({}, options);
options = util._extend(options, self.options);
Expand Down Expand Up @@ -236,7 +236,7 @@ Agent.prototype.createSocket = function(req, options, cb) {
}
};

Agent.prototype.removeSocket = function(s, options) {
Agent.prototype.removeSocket = function removeSocket(s, options) {
var name = this.getName(options);
debug('removeSocket', name, 'writable:', s.writable);
var sets = [this.sockets];
Expand Down Expand Up @@ -275,7 +275,7 @@ Agent.prototype.removeSocket = function(s, options) {
}
};

Agent.prototype.destroy = function() {
Agent.prototype.destroy = function destroy() {
var sets = [this.freeSockets, this.sockets];
for (var s = 0; s < sets.length; s++) {
var set = sets[s];
Expand Down

0 comments on commit 2e433da

Please sign in to comment.