@@ -15,13 +15,15 @@ export class ClientErrorHandler implements ErrorHandler {
15
15
if ( count && count <= 3 ) {
16
16
logger . error ( `${ this . name } server encountered error: ${ _message } , ${ _error && _error . toString ( ) } ` ) ;
17
17
return {
18
- action : ErrorAction . Continue
18
+ action : ErrorAction . Continue ,
19
+ handled : true
19
20
} ;
20
21
}
21
22
22
23
logger . error ( `${ this . name } server encountered error and will shut down: ${ _message } , ${ _error && _error . toString ( ) } ` ) ;
23
24
return {
24
- action : ErrorAction . Shutdown
25
+ action : ErrorAction . Shutdown ,
26
+ handled : true
25
27
} ;
26
28
}
27
29
@@ -30,7 +32,8 @@ export class ClientErrorHandler implements ErrorHandler {
30
32
if ( this . restarts . length < 5 ) {
31
33
logger . error ( `The ${ this . name } server crashed and will restart.` ) ;
32
34
return {
33
- action : CloseAction . Restart
35
+ action : CloseAction . Restart ,
36
+ handled : true
34
37
} ;
35
38
} else {
36
39
const diff = this . restarts [ this . restarts . length - 1 ] - this . restarts [ 0 ] ;
@@ -45,14 +48,16 @@ export class ClientErrorHandler implements ErrorHandler {
45
48
}
46
49
} ) ;
47
50
return {
48
- action : CloseAction . DoNotRestart
51
+ action : CloseAction . DoNotRestart ,
52
+ handled : true
49
53
} ;
50
54
}
51
55
52
56
logger . error ( `The ${ this . name } server crashed and will restart.` ) ;
53
57
this . restarts . shift ( ) ;
54
58
return {
55
- action : CloseAction . Restart
59
+ action : CloseAction . Restart ,
60
+ handled : true
56
61
} ;
57
62
}
58
63
}
0 commit comments