mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
lib: remove duplicate require calls in tls.js
This commit removes the duplicate require calls of the _tls_common and _tls_wrap modules. The motivation for this being that even though the modules are cached the additional calls are unnecessary. PR-URL: https://github.com/nodejs/node/pull/20099 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
parent
fb58cae1e2
commit
bbdb4af0bd
14
lib/tls.js
14
lib/tls.js
@ -34,6 +34,8 @@ const { Buffer } = require('buffer');
|
||||
const EventEmitter = require('events');
|
||||
const DuplexPair = require('internal/streams/duplexpair');
|
||||
const { canonicalizeIP } = process.binding('cares_wrap');
|
||||
const _tls_common = require('_tls_common');
|
||||
const _tls_wrap = require('_tls_wrap');
|
||||
|
||||
// Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations
|
||||
// every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more
|
||||
@ -265,12 +267,12 @@ exports.parseCertString = internalUtil.deprecate(
|
||||
'Please use querystring.parse() instead.',
|
||||
'DEP0076');
|
||||
|
||||
exports.createSecureContext = require('_tls_common').createSecureContext;
|
||||
exports.SecureContext = require('_tls_common').SecureContext;
|
||||
exports.TLSSocket = require('_tls_wrap').TLSSocket;
|
||||
exports.Server = require('_tls_wrap').Server;
|
||||
exports.createServer = require('_tls_wrap').createServer;
|
||||
exports.connect = require('_tls_wrap').connect;
|
||||
exports.createSecureContext = _tls_common.createSecureContext;
|
||||
exports.SecureContext = _tls_common.SecureContext;
|
||||
exports.TLSSocket = _tls_wrap.TLSSocket;
|
||||
exports.Server = _tls_wrap.Server;
|
||||
exports.createServer = _tls_wrap.createServer;
|
||||
exports.connect = _tls_wrap.connect;
|
||||
|
||||
exports.createSecurePair = internalUtil.deprecate(
|
||||
function createSecurePair(...args) {
|
||||
|
Loading…
Reference in New Issue
Block a user