File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
- var common = require ( '../common' ) ;
2
+ const common = require ( '../common' ) ;
3
3
4
4
if ( ! common . hasCrypto ) {
5
5
common . skip ( 'missing crypto' ) ;
6
6
return ;
7
7
}
8
- var tls = require ( 'tls' ) ;
8
+ const tls = require ( 'tls' ) ;
9
9
10
- var net = require ( 'net' ) ;
11
- var fs = require ( 'fs' ) ;
10
+ const net = require ( 'net' ) ;
11
+ const fs = require ( 'fs' ) ;
12
12
13
- var options = {
13
+ const options = {
14
14
key : fs . readFileSync ( common . fixturesDir + '/keys/agent1-key.pem' ) ,
15
15
cert : fs . readFileSync ( common . fixturesDir + '/keys/agent1-cert.pem' ) ,
16
16
handshakeTimeout : 50
17
17
} ;
18
18
19
- var server = tls . createServer ( options , common . fail ) ;
19
+ const server = tls . createServer ( options , common . fail ) ;
20
20
21
21
server . on ( 'tlsClientError' , common . mustCall ( function ( err , conn ) {
22
22
conn . destroy ( ) ;
23
23
server . close ( ) ;
24
24
} ) ) ;
25
25
26
- server . listen ( 0 , function ( ) {
26
+ server . listen ( 0 , common . mustCall ( function ( ) {
27
27
net . connect ( { host : '127.0.0.1' , port : this . address ( ) . port } ) ;
28
- } ) ;
28
+ } ) ) ;
You can’t perform that action at this time.
0 commit comments