egg-cluster
egg-cluster copied to clipboard
chore: no need for masterSocketServer to start for multiple times at sticky mode
Checklist
- [x]
npm testpasses - [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?