mirror of
https://github.com/Radarr/Radarr
synced 2026-01-01 13:13:12 +01:00
cleanup CommandId from MappedDiagnosticsContext
This commit is contained in:
parent
87da82dd90
commit
909439f615
1 changed files with 7 additions and 0 deletions
|
|
@ -166,6 +166,13 @@ private void ExecuteCommand<TCommand>(Command command) where TCommand : Command
|
|||
PublishEvent(new CommandUpdatedEvent(command));
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (MappedDiagnosticsContext.Get("CommandId") == command.Id.ToString())
|
||||
{
|
||||
MappedDiagnosticsContext.Remove("CommandId");
|
||||
}
|
||||
}
|
||||
|
||||
PublishEvent(new CommandExecutedEvent(command));
|
||||
PublishEvent(new CommandUpdatedEvent(command));
|
||||
|
|
|
|||
Loading…
Reference in a new issue