mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:17:22 +01:00
fix mediatorspam
This commit is contained in:
parent
8ac6251179
commit
c66008aa42
2 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors></Authors>
|
<Authors></Authors>
|
||||||
<Company></Company>
|
<Company></Company>
|
||||||
<Version>0.7.32</Version>
|
<Version>0.7.33</Version>
|
||||||
<Description></Description>
|
<Description></Description>
|
||||||
<Copyright></Copyright>
|
<Copyright></Copyright>
|
||||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public class MareMediator : IDisposable
|
||||||
Stopwatch globalStopwatch = Stopwatch.StartNew();
|
Stopwatch globalStopwatch = Stopwatch.StartNew();
|
||||||
_performanceCollector.LogPerformance(this, $"Publish>{message.GetType().Name}", () =>
|
_performanceCollector.LogPerformance(this, $"Publish>{message.GetType().Name}", () =>
|
||||||
{
|
{
|
||||||
foreach (var subscriber in subscribers.ToList())
|
foreach (var subscriber in subscribers.Where(s => s.Subscriber != null).ToList())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -52,7 +52,7 @@ public class MareMediator : IDisposable
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogCritical(ex, "Error executing {type} for subscriber {subscriber}, removing from Mediator", message.GetType(), subscriber);
|
_logger.LogCritical(ex, "Error executing {type} for subscriber {subscriber}, removing from Mediator", message.GetType(), subscriber);
|
||||||
subscribers.RemoveWhere(s => s == subscriber);
|
_subscriberDict[message.GetType()].RemoveWhere(s => s == subscriber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue