server start setTimeout

This commit is contained in:
Benjamin Wilson 2025-02-26 00:08:20 -05:00
parent 34eb0ca0f2
commit d8e087f720

View File

@ -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));
}