Skip to content

Commit

Permalink
Fixes #1403 - Thread safe when setting MinimumSamplingInterval (#1409)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlinMoldovean committed May 25, 2021
1 parent 4913c2b commit be41459
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Applications/ReferenceServer/ReferenceServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ protected override void OnServerStarted(IServerInternal server)

try
{
// allow a faster sampling interval for CurrentTime node.
ServerInternal.Status.Variable.CurrentTime.MinimumSamplingInterval = 250;
lock (ServerInternal.Status.Lock)
{
// allow a faster sampling interval for CurrentTime node.
ServerInternal.Status.Variable.CurrentTime.MinimumSamplingInterval = 250;
}
}
catch
{ }
Expand Down

0 comments on commit be41459

Please sign in to comment.