mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
lib: reduce usage of self = this
Remove unnecessary `self = this`. PR-URL: https://github.com/nodejs/node/pull/5231 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
07b7172d76
commit
108fc90dd7
6 files changed
+33
-42
No files matched your search
+2
-3
@@ -69,12 +69,11 @@ function createConnection(port, host, options) {
|
||||
}
|
||||
}
|
||||
|
||||
const self = this;
|
||||
const socket = tls.connect(options, function() {
|
||||
const socket = tls.connect(options, () => {
|
||||
if (!options._agentKey)
|
||||
return;
|
||||
|
||||
self._cacheSession(options._agentKey, socket.getSession());
|
||||
this._cacheSession(options._agentKey, socket.getSession());
|
||||
});
|
||||
|
||||
// Evict session on error
|
||||
|
||||
Reference in new issue
Block a user