summaryrefslogtreecommitdiff
path: root/lib/_http_outgoing.js
diff options
context:
space:
mode:
authorMarco Levrero <marco.levrero@gmail.com>2018-06-19 22:03:33 +0100
committerJon Moss <me@jonathanmoss.me>2018-08-04 17:09:58 -0400
commitd7496bff9339408ffc969975d23024453907e21a (patch)
tree00a1df5f99df03c5c26b411b87d72563ff5fc509 /lib/_http_outgoing.js
parentbd2ee60eae26973244e094c1f28d737afd392e94 (diff)
downloadandroid-node-v8-d7496bff9339408ffc969975d23024453907e21a.tar.gz
android-node-v8-d7496bff9339408ffc969975d23024453907e21a.tar.bz2
android-node-v8-d7496bff9339408ffc969975d23024453907e21a.zip
http,tls: name anonymous callbacks
This commit is to help in the effort to name all anonymous functions to help when heap debugging. Specifically, this commit fixes some anonymous functions used as listeners in the lib/ folder. PR-URL: https://github.com/nodejs/node/pull/21412 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Refs: https://github.com/nodejs/node/issues/8913
Diffstat (limited to 'lib/_http_outgoing.js')
-rw-r--r--lib/_http_outgoing.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js
index 9139350486..d150a9d93c 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 socketSetTimeoutOnConnect(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 socketDestroyOnConnect(socket) {
socket.destroy(error);
});
}