From 333530d24d1330408177aa991f81408abc34b85c Mon Sep 17 00:00:00 2001 From: Ske Date: Wed, 9 Jun 2021 14:49:26 +0200 Subject: [PATCH] Add a little leeway to shard identifying --- Myriad/Gateway/ShardIdentifyRatelimiter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Myriad/Gateway/ShardIdentifyRatelimiter.cs b/Myriad/Gateway/ShardIdentifyRatelimiter.cs index 2d364950..619eccfd 100644 --- a/Myriad/Gateway/ShardIdentifyRatelimiter.cs +++ b/Myriad/Gateway/ShardIdentifyRatelimiter.cs @@ -8,7 +8,8 @@ namespace Myriad.Gateway { public class ShardIdentifyRatelimiter { - private static readonly TimeSpan BucketLength = TimeSpan.FromSeconds(5); + // docs specify 5 seconds, but we're actually throttling connections, not identify, so we need a bit of leeway + private static readonly TimeSpan BucketLength = TimeSpan.FromSeconds(6); private readonly ConcurrentDictionary> _buckets = new(); private readonly int _maxConcurrency;