Skip to content

Commit

Permalink
Renamed field variable in TimeoutProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Aug 4, 2024
1 parent 7afcd9c commit acdb344
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Core/Cleipnir.ResilientFunctions/CoreRuntime/TimeoutProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class TimeoutProvider : ITimeoutProvider
{
private readonly ITimeoutStore _timeoutStore;

private Dictionary<string, TimeoutEvent>? _localTimeouts2;
private Dictionary<string, TimeoutEvent>? _localTimeouts;
private readonly object _sync = new();

private readonly FlowId _flowId;
Expand All @@ -34,8 +34,8 @@ public TimeoutProvider(FlowId flowId, ITimeoutStore timeoutStore)
private async Task<Dictionary<string, TimeoutEvent>> GetRegisteredTimeouts()
{
lock (_sync)
if (_localTimeouts2 is not null)
return _localTimeouts2;
if (_localTimeouts is not null)
return _localTimeouts;

var timeouts = await _timeoutStore.GetTimeouts(_flowId);
var localTimeouts = timeouts
Expand All @@ -45,10 +45,10 @@ private async Task<Dictionary<string, TimeoutEvent>> GetRegisteredTimeouts()
);

lock (_sync)
if (_localTimeouts2 is null)
_localTimeouts2 = localTimeouts;
if (_localTimeouts is null)
_localTimeouts = localTimeouts;
else
localTimeouts = _localTimeouts2;
localTimeouts = _localTimeouts;

return localTimeouts;
}
Expand Down

0 comments on commit acdb344

Please sign in to comment.