Skip to content

Commit 611cac7

Browse files
committed
Add disconnect event handler to thread in Cluster class
1 parent bd4fdf1 commit 611cac7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/cluster.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export class Cluster<
131131
this.messageHandler = new ClusterHandler(this, this.thread);
132132

133133
const thread = this.thread.spawn();
134+
thread.on('disconnect', this._handleExit.bind(this));
134135
thread.on('message', this._handleMessage.bind(this));
135136
thread.on('error', this._handleError.bind(this));
136137
thread.on('exit', this._handleExit.bind(this));

0 commit comments

Comments
 (0)