Skip to content

Commit e59f772

Browse files
authored
Move creation close to only usage
1 parent e8d9e6d commit e59f772

File tree

1 file changed

+1
-2
lines changed
  • src/ServiceControl.Audit/Infrastructure/Settings

1 file changed

+1
-2
lines changed

src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,10 @@ void LoadAuditQueueInformation()
6363
throw new Exception("ServiceBus/AuditQueue value is required to start the instance");
6464
}
6565

66-
var serviceControlNamespace = new SettingsRootNamespace("ServiceControl");
67-
6866
if (!SettingsReader.TryRead(SettingsRootNamespace, "IngestAuditMessages", out bool ingestAuditMessages))
6967
{
7068
// Backwards compatibility
69+
var serviceControlNamespace = new SettingsRootNamespace("ServiceControl");
7170
ingestAuditMessages = SettingsReader.Read(serviceControlNamespace, "IngestAuditMessages", true);
7271
}
7372

0 commit comments

Comments
 (0)