diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-09-17 02:08:38 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-09-30 22:53:24 -0400 |
| commit | 1686443ba6c5bf917f7b0ce60e23bcb8c5166df7 (patch) | |
| tree | 514c2ab62d88c1dfca0f949629f6c99682218510 /MediaBrowser.Server.Implementations | |
| parent | b15655a62d514e67815da2ba61e498ae08ecfe34 (diff) | |
add disposed check to FileRefresher
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/IO/FileRefresher.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs index 2f4605c5c..8e28aa2a0 100644 --- a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs +++ b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs @@ -68,6 +68,11 @@ namespace MediaBrowser.Server.Implementations.IO lock (_timerLock) { + if (_disposed) + { + return; + } + if (_timer == null) { _timer = new Timer(OnTimerCallback, null, TimeSpan.FromSeconds(ConfigurationManager.Configuration.LibraryMonitorDelay), TimeSpan.FromMilliseconds(-1)); @@ -287,6 +292,7 @@ namespace MediaBrowser.Server.Implementations.IO if (_timer != null) { _timer.Dispose(); + _timer = null; } } } |
