diff options
| author | Jackson Tian <puling.tyq@alibaba-inc.com> | 2016-02-15 12:53:17 +0800 |
|---|---|---|
| committer | James M Snell <jasnell@gmail.com> | 2016-03-21 15:48:51 -0700 |
| commit | d2b93e55cc941c33f06af11304eee119d56abbbe (patch) | |
| tree | 0182073ae17662f6eac4dc0e7cc1705227864831 /lib/https.js | |
| parent | f70c71f168ecf298733617c4c7ff445740d708ee (diff) | |
| download | node-new-d2b93e55cc941c33f06af11304eee119d56abbbe.tar.gz | |
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>
Diffstat (limited to 'lib/https.js')
| -rw-r--r-- | lib/https.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/https.js b/lib/https.js index 2cf1f8c491..c1d1a51dab 100644 --- a/lib/https.js +++ b/lib/https.js @@ -77,12 +77,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 |
