release connected async akways
This commit is contained in:
@@ -56,6 +56,8 @@ public class SignalRLimitFilter : IHubFilter
|
|||||||
public async Task OnConnectedAsync(HubLifetimeContext context, Func<HubLifetimeContext, Task> next)
|
public async Task OnConnectedAsync(HubLifetimeContext context, Func<HubLifetimeContext, Task> next)
|
||||||
{
|
{
|
||||||
await ConnectionLimiterSemaphore.WaitAsync().ConfigureAwait(false);
|
await ConnectionLimiterSemaphore.WaitAsync().ConfigureAwait(false);
|
||||||
|
try
|
||||||
|
{
|
||||||
var ip = accessor.GetIpAddress();
|
var ip = accessor.GetIpAddress();
|
||||||
var client = new ClientRequestIdentity
|
var client = new ClientRequestIdentity
|
||||||
{
|
{
|
||||||
@@ -75,9 +77,8 @@ public class SignalRLimitFilter : IHubFilter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
|
||||||
{
|
await Task.Delay(25).ConfigureAwait(false);
|
||||||
await Task.Delay(100).ConfigureAwait(false);
|
|
||||||
await next(context).ConfigureAwait(false);
|
await next(context).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -102,7 +103,7 @@ public class SignalRLimitFilter : IHubFilter
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await next(context, exception).ConfigureAwait(false);
|
await next(context, exception).ConfigureAwait(false);
|
||||||
await Task.Delay(250).ConfigureAwait(false);
|
await Task.Delay(25).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user