Skip to content

Commit

Permalink
AppMetrics#588 fixing apdex not measure in tracking middleware due to…
Browse files Browse the repository at this point in the history
… incorrect condition on check for websocket connection
  • Loading branch information
alhardy committed Jul 3, 2020
1 parent eaccf2f commit 2b80de9
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@ public ApdexMiddleware(
public Task Invoke(HttpContext context)
// ReSharper restore UnusedMember.Global
{
if (!context.WebSockets.IsWebSocketRequest)
{
return _next(context);
}

return MeasureTransaction(context);
return context.WebSockets.IsWebSocketRequest
? _next(context)
: MeasureTransaction(context);
}

private async Task MeasureTransaction(HttpContext context)
Expand Down

0 comments on commit 2b80de9

Please sign in to comment.