Browse Source

http: name anonymous functions

Ref: https://github.com/nodejs/node/issues/8913
PR-URL: https://github.com/nodejs/node/pull/9054
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v7.x
maasencioh 8 years ago
committed by James M Snell
parent
commit
9099a43073
  1. 10
      lib/_http_agent.js

10
lib/_http_agent.js

@ -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 += ':';
@ -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 = {
@ -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);
@ -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];
@ -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];

Loading…
Cancel
Save