aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/IO/LibraryMonitor.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-02-02 14:21:03 -0500
committerGitHub <noreply@github.com>2019-02-02 14:21:03 -0500
commit42d5a48491904ae4251e32c17da037a1a5ba77eb (patch)
tree482a1e2c280cf10b96370e280d4027dddad7c48b /Emby.Server.Implementations/IO/LibraryMonitor.cs
parent20dac6d6b8d44e8789f6d816181f69c6fc1ec02b (diff)
parent5ac6d0ae59731cdf9de0a5565d0cd894695bdc12 (diff)
Merge pull request #788 from Bond-009/warnings
Fix more warnings
Diffstat (limited to 'Emby.Server.Implementations/IO/LibraryMonitor.cs')
-rw-r--r--Emby.Server.Implementations/IO/LibraryMonitor.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs
index dad81c195..ed5fddb52 100644
--- a/Emby.Server.Implementations/IO/LibraryMonitor.cs
+++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs
@@ -601,20 +601,26 @@ namespace Emby.Server.Implementations.IO
/// </summary>
public void Dispose()
{
- _disposed = true;
Dispose(true);
}
/// <summary>
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
- /// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
- protected virtual void Dispose(bool dispose)
+ /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
+ protected virtual void Dispose(bool disposing)
{
- if (dispose)
+ if (_disposed)
+ {
+ return;
+ }
+
+ if (disposing)
{
Stop();
}
+
+ _disposed = true;
}
}