Skip to content

Commit

Permalink
Reset method refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mariozski committed Jul 28, 2017
1 parent d8b6e94 commit ef2a5de
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Serilog/Context/LogContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,9 @@ public static IDisposable Suspend()
/// </summary>
public static void Reset()
{
var enrichers = GetOrCreateEnricherStack();
if (!enrichers.IsEmpty)
if (Enrichers != null && Enrichers != ImmutableStack<ILogEventEnricher>.Empty)
{
enrichers = ImmutableStack<ILogEventEnricher>.Empty;
Enrichers = enrichers;
Enrichers = ImmutableStack<ILogEventEnricher>.Empty;
}
}

Expand Down

0 comments on commit ef2a5de

Please sign in to comment.