Skip to content

Commit

Permalink
Fix RATELIMIT_RESET
Browse files Browse the repository at this point in the history
  • Loading branch information
cristipufu committed Nov 13, 2023
1 parent f1e1fad commit a846cc8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private async ValueTask<RateLimitLease> AcquireAsyncCoreInternal()

leaseContext.Count = response.Count;
leaseContext.RetryAfter = response.RetryAfter;
leaseContext.ExpiresAt = DateTimeOffset.FromUnixTimeSeconds(response.ExpiresAt);
leaseContext.ExpiresAt = response.ExpiresAt;

if (leaseContext.Count > _options.PermitLimit)
{
Expand All @@ -98,7 +98,7 @@ private sealed class FixedWindowLeaseContext

public TimeSpan? RetryAfter { get; set; }

public DateTimeOffset? ExpiresAt { get; set; }
public long? ExpiresAt { get; set; }
}

private sealed class FixedWindowLease : RateLimitLease
Expand Down

0 comments on commit a846cc8

Please sign in to comment.