Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple cleanup #1219

Merged
merged 1 commit into from
May 24, 2023
Merged

Simple cleanup #1219

merged 1 commit into from
May 24, 2023

Conversation

geeknoid
Copy link
Contributor

@geeknoid geeknoid commented May 24, 2023

The issue or feature being addressed

Details on the issue fix or feature implementation

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

@@ -58,7 +58,7 @@ public TimeoutResilienceStrategy(TimeoutStrategyOptions options, TimeProvider ti
_cancellationTokenSourcePool.Return(cancellationSource);

// check the outcome
if (outcome.Exception is OperationCanceledException e && isCancellationRequested && !previousToken.IsCancellationRequested)
if (isCancellationRequested && outcome.Exception is OperationCanceledException e && !previousToken.IsCancellationRequested)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the boolean first as it avoids the need for a type check in the majority of cases.

@geeknoid geeknoid enabled auto-merge May 24, 2023 14:06
@martincostello martincostello added the v8 Issues related to the new version 8 of the Polly library. label May 24, 2023
@martincostello martincostello added this to the v8.0.0 milestone May 24, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2023

Codecov Report

Merging #1219 (c435634) into main (516791f) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main    #1219      +/-   ##
==========================================
- Coverage   82.63%   82.63%   -0.01%     
==========================================
  Files         263      263              
  Lines        6042     6040       -2     
  Branches      971      970       -1     
==========================================
- Hits         4993     4991       -2     
  Misses        844      844              
  Partials      205      205              
Flag Coverage Δ
linux ?
macos 82.63% <100.00%> (-0.01%) ⬇️
windows 82.63% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/Polly.Core/Timeout/TimeoutResilienceStrategy.cs 100.00% <ø> (ø)
src/Polly.Core/Retry/RetryResilienceStrategy.cs 100.00% <100.00%> (ø)

@geeknoid
Copy link
Contributor Author

@martincostello I don't know why the code-ql check failed, seems like a CI issue. Can you advise?

@martincostello
Copy link
Member

I'm not sure, I just see a load of compiler errors (and then the GitHub app crashed...).

I've just told it to re-run in case it was some random transient thing. If it still fails I'll take a look tomorrow.

@geeknoid geeknoid merged commit aa99377 into main May 24, 2023
@geeknoid geeknoid deleted the geeknoid/retry branch May 24, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 Issues related to the new version 8 of the Polly library.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants