1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-02-27 00:02:25 +00:00

Fix: Rare timing issue on first-use causing duplicate naming config

This commit is contained in:
Qstick 2017-12-13 21:32:38 -05:00
parent b63d9d0146
commit 4525f99370

View file

@ -21,8 +21,16 @@ public NamingConfig GetConfig()
if (config == null) if (config == null)
{ {
_repository.Insert(NamingConfig.Default); lock (_repository)
config = _repository.Single(); {
config = _repository.SingleOrDefault();
if (config == null)
{
_repository.Insert(NamingConfig.Default);
config = _repository.Single();
}
}
} }
return config; return config;