From fc5825a941b97f2a37291785350d0655c2bf4fa2 Mon Sep 17 00:00:00 2001 From: spiral Date: Thu, 23 Dec 2021 22:02:45 -0500 Subject: [PATCH] fix twilight gateway ratelimiter --- Myriad/Gateway/Limit/TwilightGatewayRatelimiter.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Myriad/Gateway/Limit/TwilightGatewayRatelimiter.cs b/Myriad/Gateway/Limit/TwilightGatewayRatelimiter.cs index a52e6754..9a421bdc 100644 --- a/Myriad/Gateway/Limit/TwilightGatewayRatelimiter.cs +++ b/Myriad/Gateway/Limit/TwilightGatewayRatelimiter.cs @@ -22,9 +22,12 @@ public class TwilightGatewayRatelimiter: IGatewayRatelimiter { _logger.Information("Shard {ShardId}: Requesting identify at gateway queue {GatewayQueueUrl}", shard, _url); - await _httpClient.GetAsync(_url); + await _httpClient.GetAsync(_url + "?shard=" + shard); return; } - catch (TimeoutException) { } + catch (TaskCanceledException) + { + _logger.Warning("Shard {ShardId}: Gateway queue timed out, retrying", shard); + } } } \ No newline at end of file