mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-15 22:54:15 +01:00
adjust connection limitations
This commit is contained in:
parent
3a7fe47bbb
commit
588eb9f4ed
1 changed files with 3 additions and 3 deletions
|
|
@ -15,8 +15,8 @@ public class SignalRLimitFilter : IHubFilter
|
||||||
private readonly IRateLimitProcessor _processor;
|
private readonly IRateLimitProcessor _processor;
|
||||||
private readonly IHttpContextAccessor accessor;
|
private readonly IHttpContextAccessor accessor;
|
||||||
private readonly ILogger<SignalRLimitFilter> logger;
|
private readonly ILogger<SignalRLimitFilter> logger;
|
||||||
private static readonly SemaphoreSlim ConnectionLimiterSemaphore = new(5);
|
private static readonly SemaphoreSlim ConnectionLimiterSemaphore = new(10);
|
||||||
private static readonly SemaphoreSlim DisconnectLimiterSemaphore = new(5);
|
private static readonly SemaphoreSlim DisconnectLimiterSemaphore = new(10);
|
||||||
|
|
||||||
public SignalRLimitFilter(
|
public SignalRLimitFilter(
|
||||||
IOptions<IpRateLimitOptions> options, IProcessingStrategy processing, IIpPolicyStore policyStore, IHttpContextAccessor accessor, ILogger<SignalRLimitFilter> logger)
|
IOptions<IpRateLimitOptions> options, IProcessingStrategy processing, IIpPolicyStore policyStore, IHttpContextAccessor accessor, ILogger<SignalRLimitFilter> logger)
|
||||||
|
|
@ -77,7 +77,7 @@ public class SignalRLimitFilter : IHubFilter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await Task.Delay(250).ConfigureAwait(false);
|
await Task.Delay(100).ConfigureAwait(false);
|
||||||
await next(context).ConfigureAwait(false);
|
await next(context).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue