Comparing version 2.5.0 to 2.6.0
@@ -253,4 +253,9 @@ const cluster = require('cluster'), | ||
_onDisconnect() { | ||
this.ready = false; | ||
this._setState(WorkerWrapper.STATES.STOPPING); | ||
// "disconnect" and "exit" may be triggered in any order: | ||
// https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterworkers | ||
// Check state is stoppable for coordination. | ||
if (this.isRunning()) { | ||
this.ready = false; | ||
this._setState(WorkerWrapper.STATES.STOPPING); | ||
} | ||
} | ||
@@ -257,0 +262,0 @@ |
{ | ||
"name": "luster", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Node.js cluster wrapper", | ||
@@ -5,0 +5,0 @@ "main": "./lib/luster.js", |
88955
2241