Skip to content

Commit

Permalink
Remove console context from Items in OnPerformed
Browse files Browse the repository at this point in the history
  • Loading branch information
pieceofsummer committed Aug 10, 2018
1 parent 39d728f commit 3a11603
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Hangfire.Console/Server/ConsoleServerFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public void OnPerformed(PerformedContext filterContext)
{
ConsoleContext.FromPerformContext(filterContext)?.Expire(_options.ExpireIn);
}

// remove console context to prevent further writes from filters
filterContext.Items.Remove("ConsoleContext");
}
}
}

0 comments on commit 3a11603

Please sign in to comment.