mirror of https://github.com/nodejs/node.git
90d1147b8b
Currently, cluster workers can be removed from the workers list in three different places: - In the exit event handler for the worker process. - In the disconnect event handler of the worker process. - In the disconnect event handler of the cluster master. However, handles for a given worker are cleaned up only in one of these places: in the cluster master's disconnect event handler. Because these events happen asynchronously, it is possible that the workers list is empty before we even clean up one handle. This makes the assert that makes sure that no handle is left when the workers list is empty fail. This commit removes the worker from the cluster.workers list only when the worker is dead _and_ disconnected, at which point we're sure that its associated handles are cleaned up. Fixes #8191 and #8192. Reviewed-By: Fedor Indutny <fedor@indutny.com> |
||
---|---|---|
.. | ||
api | ||
api_assets | ||
changelog-foot.html | ||
changelog-head.html | ||
full-white-stripe.jpg | ||
mac_osx_nodejs_installer_logo.png | ||
node.1 | ||
sh.css | ||
sh_javascript.min.js | ||
sh_main.js | ||
sh_vim-dark.css | ||
template.html | ||
thin-white-stripe.jpg |