aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-03-16 11:07:22 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-03-16 11:07:22 +0100
commit520c07e8cad3e4372f6a5214160d1600106a7bfd (patch)
tree1a50b779de47026ed6bd6b4344eb019e13aa3bdc /Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs
parent80b8661008f271efad595e75de7b0c50971b131b (diff)
parent24cc1e9aead3a353b4749dc3e0c0d17a79a85c96 (diff)
Merge branch 'master' into network-rewrite
Diffstat (limited to 'Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs')
-rw-r--r--Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs
index e724618b3..d32759017 100644
--- a/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs
+++ b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs
@@ -87,29 +87,30 @@ namespace Emby.Server.Implementations.EntryPoints
}
}
- private void UpdateTimerCallback(object? state)
+ private async void UpdateTimerCallback(object? state)
{
+ List<KeyValuePair<Guid, List<BaseItem>>> changes;
lock (_syncLock)
{
// Remove dupes in case some were saved multiple times
- var changes = _changedItems.ToList();
+ changes = _changedItems.ToList();
_changedItems.Clear();
- SendNotifications(changes, CancellationToken.None).GetAwaiter().GetResult();
-
if (_updateTimer is not null)
{
_updateTimer.Dispose();
_updateTimer = null;
}
}
+
+ await SendNotifications(changes, CancellationToken.None).ConfigureAwait(false);
}
private async Task SendNotifications(List<KeyValuePair<Guid, List<BaseItem>>> changes, CancellationToken cancellationToken)
{
- foreach (var pair in changes)
+ foreach ((var key, var value) in changes)
{
- await SendNotifications(pair.Key, pair.Value, cancellationToken).ConfigureAwait(false);
+ await SendNotifications(key, value, cancellationToken).ConfigureAwait(false);
}
}