egg-cluster icon indicating copy to clipboard operation
egg-cluster copied to clipboard

chore: no need for masterSocketServer to start for multiple times at sticky mode

Open thorseraq opened this issue 2 years ago • 0 comments

Checklist
  • [x] npm test passes
  • [x] commit message follows commit guidelines
Description of change

When there are >1 workers, it seems https://github.com/eggjs/egg-cluster/blob/74cbb35a8890cdf069f2a98aab288d9804419c70/lib/app_worker.js#L135 will trigger onAppStart() for multiple times, causing startMasterSocketServer() duplicated init, how about considering explicitly constraining it?

thorseraq avatar Oct 19 '23 16:10 thorseraq