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

Fix Http2Connection.GetIdleTicks #55820

Merged
merged 1 commit into from Jul 16, 2021

Conversation

alnikola
Copy link
Contributor

There is currently a wrong operand order in the subtraction.

Fixes #43877

@ghost
Copy link

ghost commented Jul 16, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

There is currently a wrong operand order in the subtraction.

Fixes #43877

Author: alnikola
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@alnikola
Copy link
Contributor Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@alnikola alnikola merged commit 04a8f5e into dotnet:main Jul 16, 2021
@alnikola alnikola deleted the alnikola/43877-fix-h2-getidleticks branch July 16, 2021 15:13
@geoffkizer
Copy link
Contributor

Wow, thanks for catching this.

Why didn't this surface sooner? I guess it's a weird one, because it would cause connections to be treated as idle when they weren't, but only if they had 0 active requests?

I'm trying to figure out how to guard against this in the future. Seems like we should at least assert somewhere that the result of GetIdleTicks() is >= 0?

@alnikola
Copy link
Contributor Author

alnikola commented Jul 20, 2021

I guess it's a weird one, because it would cause connections to be treated as idle when they weren't, but only if they had 0 active requests?

It's really the opposite. In the broken version, a connection would never be treated as idle. This behavior failed the test that expected an idle connection to be removed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants