diff --git a/src/services/stratum-v1.service.ts b/src/services/stratum-v1.service.ts index 6b30ce6..e16f9e9 100644 --- a/src/services/stratum-v1.service.ts +++ b/src/services/stratum-v1.service.ts @@ -39,9 +39,13 @@ export class StratumV1Service implements OnModuleInit { await this.clientService.deleteAll(); } - process.env.STRATUM_PORTS.split(',').forEach(port =>{ - this.startSocketServer(parseInt(port)); - }); + // wait for all the other processes to init for an even connection distribution + setTimeout(() => { + process.env.STRATUM_PORTS.split(',').forEach(port =>{ + this.startSocketServer(parseInt(port)); + }); + }, (10000)); + }