@@ -12,19 +12,19 @@ if (process.argv[2] === 'child') {
1212 process . on ( 'message' , function ( m , socket ) {
1313 if ( ! socket ) return ;
1414
15- console . error ( '[%d ] got socket' , id , m ) ;
15+ console . error ( `[ ${ id } ] got socket ${ m } ` ) ;
1616
1717 // will call .end('end') or .write('write');
1818 socket [ m ] ( m ) ;
1919
2020 socket . resume ( ) ;
2121
2222 socket . on ( 'data' , function ( ) {
23- console . error ( '[%d ] socket.data' , id , m ) ;
23+ console . error ( `[ ${ id } ] socket.data ${ m } ` ) ;
2424 } ) ;
2525
2626 socket . on ( 'end' , function ( ) {
27- console . error ( '[%d ] socket.end' , id , m ) ;
27+ console . error ( `[ ${ id } ] socket.end ${ m } ` ) ;
2828 } ) ;
2929
3030 // store the unfinished socket
@@ -33,27 +33,27 @@ if (process.argv[2] === 'child') {
3333 }
3434
3535 socket . on ( 'close' , function ( had_error ) {
36- console . error ( '[%d ] socket.close' , id , had_error , m ) ;
36+ console . error ( `[ ${ id } ] socket.close ${ had_error } ${ m } ` ) ;
3737 } ) ;
3838
3939 socket . on ( 'finish' , function ( ) {
40- console . error ( '[%d ] socket finished' , id , m ) ;
40+ console . error ( `[ ${ id } ] socket finished ${ m } ` ) ;
4141 } ) ;
4242 } ) ;
4343
4444 process . on ( 'message' , function ( m ) {
4545 if ( m !== 'close' ) return ;
46- console . error ( '[%d ] got close message' , id ) ;
46+ console . error ( `[ ${ id } ] got close message` ) ;
4747 needEnd . forEach ( function ( endMe , i ) {
48- console . error ( '[%d ] ending %d/%d' , id , i , needEnd . length ) ;
48+ console . error ( `[ ${ id } ] ending ${ i } / ${ needEnd . length } ` ) ;
4949 endMe . end ( 'end' ) ;
5050 } ) ;
5151 } ) ;
5252
5353 process . on ( 'disconnect' , function ( ) {
54- console . error ( '[%d ] process disconnect, ending' , id ) ;
54+ console . error ( `[ ${ id } ] process disconnect, ending` ) ;
5555 needEnd . forEach ( function ( endMe , i ) {
56- console . error ( '[%d ] ending %d/%d' , id , i , needEnd . length ) ;
56+ console . error ( `[ ${ id } ] ending ${ i } / ${ needEnd . length } ` ) ;
5757 endMe . end ( 'end' ) ;
5858 } ) ;
5959 } ) ;
@@ -86,7 +86,7 @@ if (process.argv[2] === 'child') {
8686 connected += 1 ;
8787
8888 socket . once ( 'close' , function ( ) {
89- console . log ( ' [m] socket closed, total %d' , ++ closed ) ;
89+ console . log ( ` [m] socket closed, total ${ ++ closed } ` ) ;
9090 } ) ;
9191
9292 if ( connected === count ) {
0 commit comments