mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-18 05:04:16 +01:00
release connected async akways
This commit is contained in:
parent
588eb9f4ed
commit
8236d355a2
1 changed files with 22 additions and 21 deletions
|
|
@ -56,6 +56,8 @@ public class SignalRLimitFilter : IHubFilter
|
|||
public async Task OnConnectedAsync(HubLifetimeContext context, Func<HubLifetimeContext, Task> next)
|
||||
{
|
||||
await ConnectionLimiterSemaphore.WaitAsync().ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
var ip = accessor.GetIpAddress();
|
||||
var client = new ClientRequestIdentity
|
||||
{
|
||||
|
|
@ -75,9 +77,8 @@ public class SignalRLimitFilter : IHubFilter
|
|||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await Task.Delay(100).ConfigureAwait(false);
|
||||
|
||||
await Task.Delay(25).ConfigureAwait(false);
|
||||
await next(context).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -102,7 +103,7 @@ public class SignalRLimitFilter : IHubFilter
|
|||
try
|
||||
{
|
||||
await next(context, exception).ConfigureAwait(false);
|
||||
await Task.Delay(250).ConfigureAwait(false);
|
||||
await Task.Delay(25).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue