Fixes wire exception spam (#14780)
This commit is contained in:
@@ -340,10 +340,14 @@ public sealed class WiresSystem : EntitySystem
|
||||
{
|
||||
foreach (var (owner, wireAction) in _finishedWires)
|
||||
{
|
||||
// sure
|
||||
_activeWires[owner].RemoveAll(action => action.CancelToken == wireAction.CancelToken);
|
||||
if (!_activeWires.TryGetValue(owner, out var activeWire))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_activeWires[owner].Count == 0)
|
||||
activeWire.RemoveAll(action => action.CancelToken == wireAction.CancelToken);
|
||||
|
||||
if (activeWire.Count == 0)
|
||||
{
|
||||
_activeWires.Remove(owner);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user