mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-23 15:30:56 -04:00
add disposed check to FileRefresher
This commit is contained in:
parent
8397a0a56e
commit
7a67dba8ef
@ -68,6 +68,11 @@ namespace MediaBrowser.Server.Implementations.IO
|
|||||||
|
|
||||||
lock (_timerLock)
|
lock (_timerLock)
|
||||||
{
|
{
|
||||||
|
if (_disposed)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_timer == null)
|
if (_timer == null)
|
||||||
{
|
{
|
||||||
_timer = new Timer(OnTimerCallback, null, TimeSpan.FromSeconds(ConfigurationManager.Configuration.LibraryMonitorDelay), TimeSpan.FromMilliseconds(-1));
|
_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)
|
if (_timer != null)
|
||||||
{
|
{
|
||||||
_timer.Dispose();
|
_timer.Dispose();
|
||||||
|
_timer = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user