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

Don't log an error when a BackgroundService is canceled due to the host being stopped. #57005

Merged
merged 6 commits into from
Aug 10, 2021

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Aug 6, 2021

Fix #56032

@ghost
Copy link

ghost commented Aug 6, 2021

Tagging subscribers to this area: @eerhardt, @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

Fix #56032

Author: eerhardt
Assignees: -
Labels:

area-Extensions-Hosting

Milestone: -

@davidfowl
Copy link
Member

I think you could simplify this by never unsetting the stopping flag.

@eerhardt
Copy link
Member Author

eerhardt commented Aug 6, 2021

never unsetting the stopping flag.

I thought about that, but it feels wrong to still have "_stopping = true" once the Host is done stopping. Maybe I could rename it to _stopCalled or similar, then it would feel better.

@davidfowl
Copy link
Member

Yep lets rename it. Since you can't restart it simplifies the thing. Well the indenting 😄

- Make it obvious the test is using the default worker template
@eerhardt eerhardt merged commit 4d26112 into dotnet:main Aug 10, 2021
@eerhardt eerhardt deleted the Fix56032 branch August 10, 2021 15:18
@ghost ghost locked as resolved and limited conversation to collaborators Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CTRL+C on a BackgroundService waiting on an async operation causes errors in the log
4 participants