mirror of
https://github.com/Readarr/Readarr
synced 2026-02-11 01:04:44 +01:00
Fixed: Only log /proc/mounts exception once per process
Closes #2080 (cherry picked from commit ce0388ca99b7f89bd9e8971777a7995c4361d268)
This commit is contained in:
parent
e346eb6c64
commit
20a477f95d
1 changed files with 6 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ public class ProcMountProvider : IProcMountProvider
|
|||
private static Dictionary<string, bool> _fileSystems;
|
||||
|
||||
private readonly Logger _logger;
|
||||
private bool _hasLoggedProcMountFailure = false;
|
||||
|
||||
public ProcMountProvider(Logger logger)
|
||||
{
|
||||
|
|
@ -45,7 +46,11 @@ public List<IMount> GetMounts()
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Debug(ex, "Failed to retrieve mounts from {0}", PROC_MOUNTS_FILENAME);
|
||||
if (!_hasLoggedProcMountFailure)
|
||||
{
|
||||
_logger.Debug(ex, "Failed to retrieve mounts from {0}", PROC_MOUNTS_FILENAME);
|
||||
_hasLoggedProcMountFailure = true;
|
||||
}
|
||||
}
|
||||
|
||||
return new List<IMount>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue