Skip to content

Fix use of cluster module#302

Closed
bruce-one wants to merge 2 commits intonexe:masterfrom
bruce-one:cluster-fix
Closed

Fix use of cluster module#302
bruce-one wants to merge 2 commits intonexe:masterfrom
bruce-one:cluster-fix

Conversation

@bruce-one
Copy link
Copy Markdown
Contributor

@bruce-one bruce-one commented Feb 12, 2017

This PR fixes the cluster module with nexe (tested with node 6 and 5).

Although... I'm not entirely sure why...

Without the extra replace a new worker will fork, but then hangs and doesn't ever actually do anything.

With this patch the worker works as expected.

I sorta stumbled across the fix because I noticed the diff (process.nextTick vs setImmediate) from nodejs/node#8821 and thought I'd see if it did anything. Apparently it did.

Absolutely no problem if you don't want to merge this (and I'd understand if you didn't because it's a bit "odd"), but thought I'd create a PR in case it helps anyone :-)

Happy to change/clean it too :-)

(The cluster-test is just the express-test with a cluster.fork()...)

@calebboyd
Copy link
Copy Markdown
Member

Hmm Yes.. This is a bit odd! Sorry!

@calebboyd calebboyd closed this Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants