Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
nenoNaninu committed Jan 27, 2025
1 parent 7266228 commit e1753d3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ public async Task OnDisconnectedAsync(
{
var previousActivity = Activity.Current;

var shouldClearTraceContext = previousActivity is not null && !_options.UseParentTraceContext;
var shouldClearParentTraceContext = previousActivity is not null && !_options.UseParentTraceContext;

if (shouldClearTraceContext)
if (shouldClearParentTraceContext)
{
Activity.Current = null;
}
Expand Down Expand Up @@ -175,7 +175,7 @@ public async Task OnDisconnectedAsync(
}
finally
{
if (shouldClearTraceContext)
if (shouldClearParentTraceContext)
{
// restore previous activity
Activity.Current = previousActivity;
Expand Down

0 comments on commit e1753d3

Please sign in to comment.