Skip to content

Commit

Permalink
Bump SonarAnalyzer.CSharp from 9.27.0.93347 to 9.28.0.94264 (#2167)
Browse files Browse the repository at this point in the history
* Bump SonarAnalyzer.CSharp from 9.27.0.93347 to 9.28.0.94264

Bumps [SonarAnalyzer.CSharp](https://github.com/SonarSource/sonar-dotnet) from 9.27.0.93347 to 9.28.0.94264.
- [Release notes](https://github.com/SonarSource/sonar-dotnet/releases)
- [Commits](SonarSource/sonar-dotnet@9.27.0.93347...9.28.0.94264)

---
updated-dependencies:
- dependency-name: SonarAnalyzer.CSharp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix S1871 warning

Combine duplicate code blocks.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
  • Loading branch information
dependabot[bot] and martincostello authored Jun 28, 2024
1 parent 7105558 commit 3a78be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<PackageVersion Include="Polly.Testing" Version="$(PollyVersion)" />
<PackageVersion Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
<PackageVersion Include="ReportGenerator" Version="5.3.6" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.27.0.93347" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.28.0.94264" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="4.5.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(MicrosoftExtensionsVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,7 @@ public ValueTask OnHandledOutcomeAsync(Outcome<T> outcome, ResilienceContext con
// the metric; we do not want to duplicate-signal onBreak; we do not want to extend time for which the circuit is broken.
// We do not want to mask the fact that the call executed (as replacing its result with a Broken/IsolatedCircuitException would do).

if (_circuitState == CircuitState.HalfOpen)
{
OpenCircuit_NeedsLock(outcome, manual: false, context, out task);
}
else if (_circuitState == CircuitState.Closed && shouldBreak)
if (_circuitState == CircuitState.HalfOpen || (_circuitState == CircuitState.Closed && shouldBreak))
{
OpenCircuit_NeedsLock(outcome, manual: false, context, out task);
}
Expand Down

0 comments on commit 3a78be9

Please sign in to comment.