mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Fixed: Only log /proc/mounts exception once per process
Closes #3239 (cherry picked from commit ce0388ca99b7f89bd9e8971777a7995c4361d268)
This commit is contained in:
parent
b606c68f80
commit
5baa7bbc4f
1 changed files with 6 additions and 1 deletions
|
@ -26,6 +26,7 @@ namespace NzbDrone.Mono.Disk
|
||||||
private static Dictionary<string, bool> _fileSystems;
|
private static Dictionary<string, bool> _fileSystems;
|
||||||
|
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
private bool _hasLoggedProcMountFailure = false;
|
||||||
|
|
||||||
public ProcMountProvider(Logger logger)
|
public ProcMountProvider(Logger logger)
|
||||||
{
|
{
|
||||||
|
@ -44,8 +45,12 @@ namespace NzbDrone.Mono.Disk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
if (!_hasLoggedProcMountFailure)
|
||||||
{
|
{
|
||||||
_logger.Debug(ex, "Failed to retrieve mounts from {0}", PROC_MOUNTS_FILENAME);
|
_logger.Debug(ex, "Failed to retrieve mounts from {0}", PROC_MOUNTS_FILENAME);
|
||||||
|
_hasLoggedProcMountFailure = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new List<IMount>();
|
return new List<IMount>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue