@@ -38,7 +38,7 @@ const options = {
3838} ;
3939
4040// create server
41- const server = https . createServer ( options , common . mustCall ( function ( req , res ) {
41+ const server = https . createServer ( options , common . mustCall ( ( req , res ) => {
4242 res . end ( 'Goodbye' ) ;
4343} , 2 ) ) ;
4444
@@ -49,7 +49,7 @@ server.listen(0, function() {
4949 const client1 = tls . connect ( {
5050 port : this . address ( ) . port ,
5151 rejectUnauthorized : false
52- } , function ( ) {
52+ } , ( ) => {
5353 console . log ( 'connect1' ) ;
5454 assert . ok ( ! client1 . isSessionReused ( ) , 'Session *should not* be reused.' ) ;
5555 session1 = client1 . getSession ( ) ;
@@ -58,7 +58,7 @@ server.listen(0, function() {
5858 '\r\n' ) ;
5959 } ) ;
6060
61- client1 . on ( 'close' , function ( ) {
61+ client1 . on ( 'close' , ( ) => {
6262 console . log ( 'close1' ) ;
6363
6464 const opts = {
@@ -67,15 +67,15 @@ server.listen(0, function() {
6767 session : session1
6868 } ;
6969
70- const client2 = tls . connect ( opts , function ( ) {
70+ const client2 = tls . connect ( opts , ( ) => {
7171 console . log ( 'connect2' ) ;
7272 assert . ok ( client2 . isSessionReused ( ) , 'Session *should* be reused.' ) ;
7373 client2 . write ( 'GET / HTTP/1.0\r\n' +
7474 'Server: 127.0.0.1\r\n' +
7575 '\r\n' ) ;
7676 } ) ;
7777
78- client2 . on ( 'close' , function ( ) {
78+ client2 . on ( 'close' , ( ) => {
7979 console . log ( 'close2' ) ;
8080 server . close ( ) ;
8181 } ) ;
0 commit comments