diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 913935048680eb..c9ff30ce958140 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -183,7 +183,7 @@ OutgoingMessage.prototype.setTimeout = function setTimeout(msecs, callback) { } if (!this.socket) { - this.once('socket', function(socket) { + this.once('socket', function socketOnceCallback(socket) { socket.setTimeout(msecs); }); } else { @@ -200,7 +200,7 @@ OutgoingMessage.prototype.destroy = function destroy(error) { if (this.socket) { this.socket.destroy(error); } else { - this.once('socket', function(socket) { + this.once('socket', function socketOnceCallback(socket) { socket.destroy(error); }); } diff --git a/lib/_tls_common.js b/lib/_tls_common.js index d8f6afed0bd8fb..127ecb0fc9a168 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -240,7 +240,7 @@ exports.translatePeerCertificate = function translatePeerCertificate(c) { c.infoAccess = Object.create(null); // XXX: More key validation? - info.replace(/([^\n:]*):([^\n]*)(?:\n|$)/g, function(all, key, val) { + info.replace(/([^\n:]*):([^\n]*)(?:\n|$)/g, function replacerCallback(all, key, val) { if (key in c.infoAccess) c.infoAccess[key].push(val); else