Don't hang shard startup for too long

This commit is contained in:
Ske 2021-09-07 02:21:46 +02:00
parent 6dfc937257
commit b9d090d8cf

View File

@ -115,9 +115,9 @@ namespace Myriad.Gateway
if (_worker == null) if (_worker == null)
_worker = ShardLoop(); _worker = ShardLoop();
// we can probably TCS this instead of spin loop but w/e // Ideally we'd stagger the startups so we don't smash the websocket but that's difficult with the
while (State < ShardState.Identifying) // identify rate limiter so this is the best we can do rn, maybe?
await Task.Delay(50); await Task.Delay(200);
} }
public async Task UpdateStatus(GatewayStatusUpdate payload) public async Task UpdateStatus(GatewayStatusUpdate payload)