[FIX] Invoke Events without holding up code

This commit is contained in:
XorogVEVO 2022-04-05 14:35:09 +02:00
parent f389c27024
commit cb1f8d42aa
Signed by untrusted user who does not match committer: Xorog
GPG key ID: 983798ED9C3E7C36

View file

@ -153,7 +153,10 @@ public class Logger
Console.ResetColor(); Console.WriteLine(b.Message);
}
LogRaised?.Invoke(null, new LogMessageEventArgs() { LogEntry = b });
_ = Task.Run(() =>
{
LogRaised?.Invoke(null, new LogMessageEventArgs() { LogEntry = b });
});
_loggerObjects.LogsToPost.Remove(b);