File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ if (!id) {
5151 b . send ( 'START' ) ;
5252 } ) ;
5353
54- var ok = false ;
54+ let ok = false ;
5555
5656 b . on ( 'message' , function ( m ) {
5757 if ( typeof m === 'object' ) return ; // ignore system messages
@@ -68,7 +68,7 @@ if (!id) {
6868else if ( id === 'one' ) {
6969 if ( cluster . isMaster ) return startWorker ( ) ;
7070
71- var server = http . createServer ( common . fail ) . listen ( common . PORT , function ( ) {
71+ http . createServer ( common . fail ) . listen ( common . PORT , function ( ) {
7272 process . send ( 'READY' ) ;
7373 } ) ;
7474
@@ -79,7 +79,7 @@ else if (id === 'one') {
7979else if ( id === 'two' ) {
8080 if ( cluster . isMaster ) return startWorker ( ) ;
8181
82- var ok = false ;
82+ let ok = false ;
8383 process . on ( 'exit' , function ( ) {
8484 assert ( ok ) ;
8585 } ) ;
Original file line number Diff line number Diff line change 2020
2121
2222function master ( ) {
23- var i ;
2423 var received = 0 ;
2524
2625 // Start listening on a socket.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ var net = require('net');
1111var id = '' + process . argv [ 2 ] ;
1212
1313if ( id === 'undefined' ) {
14- var server = net . createServer ( common . fail ) ;
14+ const server = net . createServer ( common . fail ) ;
1515 server . listen ( common . PORT , function ( ) {
1616 var worker = fork ( __filename , [ 'worker' ] ) ;
1717 worker . on ( 'message' , function ( msg ) {
@@ -23,7 +23,7 @@ if (id === 'undefined') {
2323 } ) ;
2424}
2525else if ( id === 'worker' ) {
26- var server = net . createServer ( common . fail ) ;
26+ let server = net . createServer ( common . fail ) ;
2727 server . listen ( common . PORT , common . fail ) ;
2828 server . on ( 'error' , common . mustCall ( function ( e ) {
2929 assert ( e . code , 'EADDRINUSE' ) ;
You can’t perform that action at this time.
0 commit comments