diff --git a/src/configuration/configuration/Configuration.csproj b/src/configuration/configuration/Configuration.csproj
index b00a296..69b7200 100644
--- a/src/configuration/configuration/Configuration.csproj
+++ b/src/configuration/configuration/Configuration.csproj
@@ -2,7 +2,7 @@
C# adaptation for @mfdlabs/environment.
- 1.0.6
+ 1.0.7
diff --git a/src/configuration/configuration/Implementation/VaultProvider.cs b/src/configuration/configuration/Implementation/VaultProvider.cs
index 50534d9..10e8296 100644
--- a/src/configuration/configuration/Implementation/VaultProvider.cs
+++ b/src/configuration/configuration/Implementation/VaultProvider.cs
@@ -164,18 +164,15 @@ protected VaultProvider(ILogger logger = null)
_logger?.Debug("VaultProvider: Setup for '{0}/{1}' to refresh every '{2}' interval!", Mount, Path, RefreshInterval);
- lock (_providers)
+ if (_providers.Contains(this))
{
- if (_providers.Contains(this))
- {
- _logger?.Debug("VaultProvider: Skipping setup for '{0}/{1}' because it is already setup!", Mount, Path);
-
- return;
- }
+ _logger?.Debug("VaultProvider: Skipping setup for '{0}/{1}' because it is already setup!", Mount, Path);
- _providers.Add(this);
+ return;
}
+ _providers.Add(this);
+
DoRefresh();
}
@@ -183,24 +180,21 @@ private static void RefreshThread()
{
while (true)
{
- lock (_providers)
- {
- var providers = _providers.ToArray();
+ var providers = _providers.ToArray();
- foreach (var provider in providers)
+ foreach (var provider in providers)
+ {
+ try
{
- try
- {
- provider.DoRefresh();
- }
- catch (Exception ex)
- {
- _staticLogger?.Error(ex);
- }
+ provider.DoRefresh();
+ }
+ catch (Exception ex)
+ {
+ _staticLogger?.Error(ex);
}
-
- Thread.Sleep(RefreshInterval); // SetClient makes DoRefresh call.
}
+
+ Thread.Sleep(RefreshInterval); // SetClient makes DoRefresh call.
}
}