Skip to content

Commit

Permalink
DiscordSink: wait for exceptions to propagate
Browse files Browse the repository at this point in the history
Fixes #237
  • Loading branch information
Erisa committed Nov 1, 2024
1 parent c3aab31 commit 14460d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Helpers/DiscordSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public DiscordSink(ITextFormatter textFormatter)

public async void Emit(LogEvent logEvent)
{
// wait for exceptions to propagate
// TODO(erisa): find a better way to do this
if (logEvent.Exception is not null )
await Task.Delay(100);

if (logEvent is null) throw new ArgumentNullException(nameof(logEvent));
lock (_syncRoot)
{
Expand Down

0 comments on commit 14460d6

Please sign in to comment.