Merge pull request #103 from PepperDash/feature/ConfigWriterCCritical

#101 Fixes scope issue with CCriticalSection() in ConfigWriter
This commit is contained in:
Andrew Welker 2020-04-10 15:24:53 -06:00 committed by GitHub
commit 3b2b69de1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,8 @@ namespace PepperDash.Essentials.Core.Config
public const long WriteTimeout = 30000;
public static CTimer WriteTimer;
public static CTimer WriteTimer;
static CCriticalSection fileLock = new CCriticalSection();
/// <summary>
/// Updates the config properties of a device
@ -127,8 +128,6 @@ namespace PepperDash.Essentials.Core.Config
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Writing Configuration to file");
var fileLock = new CCriticalSection();
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to write config file: '{0}'", filePath);
try