Ensure MaxConcurrentRequests is a positive number (#11003)
This commit is contained in:
parent
3259a2c9f6
commit
d3d6e0e709
|
|
@ -35,6 +35,10 @@ namespace Microsoft.AspNetCore.RequestThrottling
|
|||
{
|
||||
throw new ArgumentException("The value of 'options.MaxConcurrentRequests' must be specified.", nameof(options));
|
||||
}
|
||||
if (_requestThrottlingOptions.MaxConcurrentRequests < 0)
|
||||
{
|
||||
throw new ArgumentException("The value of 'options.MaxConcurrentRequests' must be a positive integer.", nameof(options));
|
||||
}
|
||||
if (_requestThrottlingOptions.RequestQueueLimit < 0)
|
||||
{
|
||||
throw new ArgumentException("The value of 'options.RequestQueueLimit' must be a positive integer.", nameof(options));
|
||||
|
|
|
|||
Loading…
Reference in New Issue