When a worker is disconnected (by calling worker.disconnect()) it will emit a 'disconnect' when it's disconnected. Right now lux doesn't listen to this event causing the full timeout to be waited every time resulting in a fixed 5 second delay for shutting down a worker.
Can be fixed by also listening to the disconnect event.
When a worker is disconnected (by calling worker.disconnect()) it will emit a 'disconnect' when it's disconnected. Right now lux doesn't listen to this event causing the full timeout to be waited every time resulting in a fixed 5 second delay for shutting down a worker.
Can be fixed by also listening to the disconnect event.
Code: https://github.com/postlight/lux/blob/master/src/packages/pm/cluster/index.js#L194 Relevant tracking issue: #701