You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking over the reate limitter documentatin I was looking at the following code sample:
_.OnRejected=(context,_)=>{if(context.Lease.TryGetMetadata(MetadataName.RetryAfter,outvarretryAfter)){context.HttpContext.Response.Headers.RetryAfter=((int)retryAfter.TotalSeconds).ToString(NumberFormatInfo.InvariantInfo);}context.HttpContext.Response.StatusCode=StatusCodes.Status429TooManyRequests;context.HttpContext.Response.WriteAsync("Too many requests. Please try again later.");returnnewValueTask();};
Is the WriteAsync method call missing the await by design? At first glance this seems as a bug.
The text was updated successfully, but these errors were encountered:
Hi,
While looking over the reate limitter documentatin I was looking at the following code sample:
Is the
WriteAsync
method call missing theawait
by design? At first glance this seems as a bug.The text was updated successfully, but these errors were encountered: