@@ -38,7 +38,7 @@ const options = {
38
38
} ;
39
39
40
40
// create server
41
- const server = https . createServer ( options , common . mustCall ( function ( req , res ) {
41
+ const server = https . createServer ( options , common . mustCall ( ( req , res ) => {
42
42
res . end ( 'Goodbye' ) ;
43
43
} , 2 ) ) ;
44
44
@@ -49,7 +49,7 @@ server.listen(0, function() {
49
49
const client1 = tls . connect ( {
50
50
port : this . address ( ) . port ,
51
51
rejectUnauthorized : false
52
- } , function ( ) {
52
+ } , ( ) => {
53
53
console . log ( 'connect1' ) ;
54
54
assert . ok ( ! client1 . isSessionReused ( ) , 'Session *should not* be reused.' ) ;
55
55
session1 = client1 . getSession ( ) ;
@@ -58,7 +58,7 @@ server.listen(0, function() {
58
58
'\r\n' ) ;
59
59
} ) ;
60
60
61
- client1 . on ( 'close' , function ( ) {
61
+ client1 . on ( 'close' , ( ) => {
62
62
console . log ( 'close1' ) ;
63
63
64
64
const opts = {
@@ -67,15 +67,15 @@ server.listen(0, function() {
67
67
session : session1
68
68
} ;
69
69
70
- const client2 = tls . connect ( opts , function ( ) {
70
+ const client2 = tls . connect ( opts , ( ) => {
71
71
console . log ( 'connect2' ) ;
72
72
assert . ok ( client2 . isSessionReused ( ) , 'Session *should* be reused.' ) ;
73
73
client2 . write ( 'GET / HTTP/1.0\r\n' +
74
74
'Server: 127.0.0.1\r\n' +
75
75
'\r\n' ) ;
76
76
} ) ;
77
77
78
- client2 . on ( 'close' , function ( ) {
78
+ client2 . on ( 'close' , ( ) => {
79
79
console . log ( 'close2' ) ;
80
80
server . close ( ) ;
81
81
} ) ;
0 commit comments