Skip to content

Commit 9554a97

Browse files
pvsousalimaaddaleax
authored andcommitted
https: name anonymous functions in https
Naming anonymous function in the https module PR-URL: #9217 Ref: #8913 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 4fa84c9 commit 9554a97

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/https.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function Server(opts, requestListener) {
3131
this.addListener('request', requestListener);
3232
}
3333

34-
this.addListener('tlsClientError', function(err, conn) {
34+
this.addListener('tlsClientError', function addListener(err, conn) {
3535
if (!this.emit('clientError', err, conn))
3636
conn.destroy(err);
3737
});
@@ -43,7 +43,7 @@ exports.Server = Server;
4343

4444
Server.prototype.setTimeout = http.Server.prototype.setTimeout;
4545

46-
exports.createServer = function(opts, requestListener) {
46+
exports.createServer = function createServer(opts, requestListener) {
4747
return new Server(opts, requestListener);
4848
};
4949

@@ -112,7 +112,7 @@ function Agent(options) {
112112
inherits(Agent, http.Agent);
113113
Agent.prototype.createConnection = createConnection;
114114

115-
Agent.prototype.getName = function(options) {
115+
Agent.prototype.getName = function getName(options) {
116116
var name = http.Agent.prototype.getName.call(this, options);
117117

118118
name += ':';
@@ -186,7 +186,7 @@ const globalAgent = new Agent();
186186
exports.globalAgent = globalAgent;
187187
exports.Agent = Agent;
188188

189-
exports.request = function(options, cb) {
189+
exports.request = function request(options, cb) {
190190
if (typeof options === 'string') {
191191
options = url.parse(options);
192192
if (!options.hostname) {
@@ -199,7 +199,7 @@ exports.request = function(options, cb) {
199199
return http.request(options, cb);
200200
};
201201

202-
exports.get = function(options, cb) {
202+
exports.get = function get(options, cb) {
203203
var req = exports.request(options, cb);
204204
req.end();
205205
return req;

0 commit comments

Comments
 (0)