log exception OnDisconnectAsync

This commit is contained in:
Stanley Dimant
2022-08-19 01:10:36 +02:00
parent 54d625e729
commit c21e2f740c

View File

@@ -94,6 +94,11 @@ public class SignalRLimitFilter : IHubFilter
HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next)
{
await DisconnectLimiterSemaphore.WaitAsync();
if (exception != null)
{
logger.LogWarning(exception, "InitialException on OnDisconnectedAsync");
}
try
{
await next(context, exception);
@@ -101,7 +106,6 @@ public class SignalRLimitFilter : IHubFilter
}
catch (Exception e)
{
logger.LogWarning(exception, "InitialException on OnDisconnectedAsync");
logger.LogWarning(e, "ThrownException on OnDisconnectedAsync");
}
finally