File tree 3 files changed +5
-6
lines changed
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ if (!id) {
51
51
b . send ( 'START' ) ;
52
52
} ) ;
53
53
54
- var ok = false ;
54
+ let ok = false ;
55
55
56
56
b . on ( 'message' , function ( m ) {
57
57
if ( typeof m === 'object' ) return ; // ignore system messages
@@ -68,7 +68,7 @@ if (!id) {
68
68
else if ( id === 'one' ) {
69
69
if ( cluster . isMaster ) return startWorker ( ) ;
70
70
71
- var server = http . createServer ( common . fail ) . listen ( common . PORT , function ( ) {
71
+ http . createServer ( common . fail ) . listen ( common . PORT , function ( ) {
72
72
process . send ( 'READY' ) ;
73
73
} ) ;
74
74
@@ -79,7 +79,7 @@ else if (id === 'one') {
79
79
else if ( id === 'two' ) {
80
80
if ( cluster . isMaster ) return startWorker ( ) ;
81
81
82
- var ok = false ;
82
+ let ok = false ;
83
83
process . on ( 'exit' , function ( ) {
84
84
assert ( ok ) ;
85
85
} ) ;
Original file line number Diff line number Diff line change 20
20
21
21
22
22
function master ( ) {
23
- var i ;
24
23
var received = 0 ;
25
24
26
25
// Start listening on a socket.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ var net = require('net');
11
11
var id = '' + process . argv [ 2 ] ;
12
12
13
13
if ( id === 'undefined' ) {
14
- var server = net . createServer ( common . fail ) ;
14
+ const server = net . createServer ( common . fail ) ;
15
15
server . listen ( common . PORT , function ( ) {
16
16
var worker = fork ( __filename , [ 'worker' ] ) ;
17
17
worker . on ( 'message' , function ( msg ) {
@@ -23,7 +23,7 @@ if (id === 'undefined') {
23
23
} ) ;
24
24
}
25
25
else if ( id === 'worker' ) {
26
- var server = net . createServer ( common . fail ) ;
26
+ let server = net . createServer ( common . fail ) ;
27
27
server . listen ( common . PORT , common . fail ) ;
28
28
server . on ( 'error' , common . mustCall ( function ( e ) {
29
29
assert ( e . code , 'EADDRINUSE' ) ;
You can’t perform that action at this time.
0 commit comments