1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 16:06:15 +00:00

Fix for endpoint specific rate limiting throwing exception

This commit is contained in:
JKorf 2024-04-19 11:45:46 +02:00
parent b2f9d5753e
commit 3d3a9b88e7

View File

@ -52,7 +52,7 @@ namespace CryptoExchange.Net.RateLimiting.Guards
/// <inheritdoc />
public RateLimitState ApplyWeight(RateLimitItemType type, RequestDefinition definition, string host, SecureString? apiKey, int requestWeight)
{
var key = definition.Path + definition.Method + definition;
var key = definition.Path + definition.Method;
var tracker = _trackers[key];
tracker.ApplyWeight(requestWeight);
return RateLimitState.Applied(definition.EndpointLimitCount!.Value, definition.EndpointLimitPeriod!.Value, tracker.Current);