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:
Jackson Tian authored and Myles Borins committed 2016-03-30 13:12:13 -07:00
1 parent 07b7172d76
commit 108fc90dd7
6 files changed
+33 -42

No files matched your search

+2 -3
View File
@@ -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