aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Core/IO/LibraryMonitor.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-04-07 15:26:59 -0400
committerGitHub <noreply@github.com>2017-04-07 15:26:59 -0400
commit7c55cd08cbfc1c4a6ba2823007432316e1efce8d (patch)
treeb045a71d84deeb89a85975d34a7a2ded2642c0d5 /Emby.Server.Core/IO/LibraryMonitor.cs
parent66e901ef93942c631c3ee3b222cc75265e1b17fb (diff)
parent6f7d8bb742f3594bdca16fa5c20c55707edad158 (diff)
Merge pull request #2567 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Core/IO/LibraryMonitor.cs')
-rw-r--r--Emby.Server.Core/IO/LibraryMonitor.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Emby.Server.Core/IO/LibraryMonitor.cs b/Emby.Server.Core/IO/LibraryMonitor.cs
index e1e3186c3..ae7b66597 100644
--- a/Emby.Server.Core/IO/LibraryMonitor.cs
+++ b/Emby.Server.Core/IO/LibraryMonitor.cs
@@ -166,7 +166,11 @@ namespace Emby.Server.Core.IO
private void Restart()
{
Stop();
- Start();
+
+ if (!_disposed)
+ {
+ Start();
+ }
}
private bool IsLibraryMonitorEnabaled(BaseItem item)
@@ -589,11 +593,13 @@ namespace Emby.Server.Core.IO
}
}
+ private bool _disposed;
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose()
{
+ _disposed = true;
Dispose(true);
GC.SuppressFinalize(this);
}