File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ Connection.prototype.connect = function (port, host) {
91
91
return self . emit ( 'error' , new Error ( 'There was an error establishing an SSL connection' ) )
92
92
}
93
93
var tls = require ( 'tls' )
94
- let options = {
94
+ const options = {
95
95
socket : self . stream ,
96
96
checkServerIdentity : self . ssl . checkServerIdentity || tls . checkServerIdentity ,
97
97
rejectUnauthorized : self . ssl . rejectUnauthorized ,
@@ -102,12 +102,11 @@ Connection.prototype.connect = function (port, host) {
102
102
cert : self . ssl . cert ,
103
103
secureOptions : self . ssl . secureOptions ,
104
104
NPNProtocols : self . ssl . NPNProtocols
105
- } ;
106
- if ( net . isIP ( host ) === 0 ) {
107
- options . servername = host ;
108
105
}
109
-
110
- self . stream = tls . connect ( options ) ;
106
+ if ( net . isIP ( host ) === 0 ) {
107
+ options . servername = host
108
+ }
109
+ self . stream = tls . connect ( options )
111
110
self . attachListeners ( self . stream )
112
111
self . stream . on ( 'error' , reportStreamError )
113
112
You can’t perform that action at this time.
0 commit comments