mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
fix concurrency issue in base app host
This commit is contained in:
parent
2af33416a7
commit
26536c22ad
@ -381,6 +381,7 @@ namespace MediaBrowser.Common.Implementations
|
||||
if (disposable != null)
|
||||
{
|
||||
Logger.Info("Registering " + disposable.GetType().Name);
|
||||
|
||||
DisposableParts.Add(disposable);
|
||||
}
|
||||
}
|
||||
@ -458,7 +459,10 @@ namespace MediaBrowser.Common.Implementations
|
||||
|
||||
if (manageLiftime)
|
||||
{
|
||||
DisposableParts.AddRange(parts.OfType<IDisposable>());
|
||||
lock (DisposableParts)
|
||||
{
|
||||
DisposableParts.AddRange(parts.OfType<IDisposable>());
|
||||
}
|
||||
}
|
||||
|
||||
return parts;
|
||||
|
Loading…
x
Reference in New Issue
Block a user