@@ -56,7 +56,7 @@ const kErrorEmitted = Symbol('error-emitted');
5656const kHandshakeTimeout = Symbol ( 'handshake-timeout' ) ;
5757const kRes = Symbol ( 'res' ) ;
5858const kSNICallback = Symbol ( 'snicallback' ) ;
59- const kSSL = Symbol ( 'ssl' ) ;
59+ const kHandle = Symbol ( 'ssl' ) ;
6060
6161const noop = ( ) => { } ;
6262
@@ -326,14 +326,14 @@ function TLSSocket(socket, opts) {
326326 } ) ;
327327
328328 // Proxy for API compatibility
329- this [ kSSL ] = this . _handle ;
329+ this [ kHandle ] = this . _handle ;
330330 Object . defineProperty ( this , 'ssl' , {
331331 enumerable : true ,
332332 configurable : true ,
333- get : util . deprecate ( ( ) => this [ kSSL ] ,
333+ get : util . deprecate ( ( ) => this [ kHandle ] ,
334334 'The tlsSocket.ssl property is deprecated.' ,
335335 'DEP00XX' ) ,
336- set : util . deprecate ( ( val ) => this [ kSSL ] = val ,
336+ set : util . deprecate ( ( val ) => this [ kHandle ] = val ,
337337 'The tlsSocket.ssl property is deprecated.' ,
338338 'DEP00XX' )
339339 } ) ;
@@ -377,8 +377,8 @@ for (var n = 0; n < proxiedMethods.length; n++) {
377377tls_wrap . TLSWrap . prototype . close = function close ( cb ) {
378378 let ssl ;
379379 if ( this [ owner_symbol ] ) {
380- ssl = this [ owner_symbol ] [ kSSL ] ;
381- this [ owner_symbol ] [ kSSL ] = null ;
380+ ssl = this [ owner_symbol ] [ kHandle ] ;
381+ this [ owner_symbol ] [ kHandle ] = null ;
382382 }
383383
384384 // Invoke `destroySSL` on close to clean up possibly pending write requests
@@ -468,13 +468,13 @@ function destroySSL(self) {
468468}
469469
470470TLSSocket . prototype . _destroySSL = function _destroySSL ( ) {
471- if ( ! this [ kSSL ] ) return ;
472- this [ kSSL ] . destroySSL ( ) ;
473- if ( this [ kSSL ] . _secureContext . singleUse ) {
474- this [ kSSL ] . _secureContext . context . close ( ) ;
475- this [ kSSL ] . _secureContext . context = null ;
471+ if ( ! this [ kHandle ] ) return ;
472+ this [ kHandle ] . destroySSL ( ) ;
473+ if ( this [ kHandle ] . _secureContext . singleUse ) {
474+ this [ kHandle ] . _secureContext . context . close ( ) ;
475+ this [ kHandle ] . _secureContext . context = null ;
476476 }
477- this [ kSSL ] = null ;
477+ this [ kHandle ] = null ;
478478} ;
479479
480480TLSSocket . prototype . _init = function ( socket , wrap ) {
0 commit comments