File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " 1.8.6 " ,
2
+ "version" : " 1.8.7 " ,
3
3
"name" : " status-sharding" ,
4
4
"author" : " Digital39999" ,
5
5
"scripts" : {
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export class Cluster<
131
131
this . messageHandler = new ClusterHandler ( this , this . thread ) ;
132
132
133
133
const thread = this . thread . spawn ( ) ;
134
- thread . on ( 'disconnect' , this . _handleExit . bind ( this ) ) ;
134
+ thread . on ( 'disconnect' , this . _handleDisconnect . bind ( this ) ) ;
135
135
thread . on ( 'message' , this . _handleMessage . bind ( this ) ) ;
136
136
thread . on ( 'error' , this . _handleError . bind ( this ) ) ;
137
137
thread . on ( 'exit' , this . _handleExit . bind ( this ) ) ;
@@ -407,6 +407,11 @@ export class Cluster<
407
407
this . thread = null ;
408
408
}
409
409
410
+ private _handleDisconnect ( ) : void {
411
+ this . emit ( 'disconnect' , this , this . thread ?. process ) ;
412
+ this . manager . _debug ( '[Death] [Cluster ' + this . id + '] Cluster disconnected.' ) ;
413
+ }
414
+
410
415
/**
411
416
* Error handler function that handles errors from the cluster's child process/worker/manager.
412
417
* @private
You can’t perform that action at this time.
0 commit comments