make server cluster proxy to be able to listen on newly forked woker …#22
make server cluster proxy to be able to listen on newly forked woker …#22lyonlai wants to merge 2 commits into
Conversation
| }); | ||
|
|
||
| //listening when new worker spins up too. | ||
| cluster.on('fork', function(worker) { |
There was a problem hiding this comment.
As per CI client claims, now we have bound the message event twice. I'd remove forEach loop and keep your code. What do you think?
There was a problem hiding this comment.
Oh. Right. Yeah it might happen depend on how you start the cluster. Sure go ahead. Thanks for pointing out. And also I think the example in the readme need to change a bit. Listen needs to happen before the fork. The current example won't find the existing workers
There was a problem hiding this comment.
Yeah it might happen depend on how you start the cluster [...] And also I think the example in the readme need to change a bit. Listen needs to happen before the fork.
Good catch. Now I'm worried because this is a breaking change. If we go ahead we are forced to release a major version, for time being I prefer to be backwards compatible.
What do you think?
…t order of cluster
targeting: #21