Skip to content

[HTTP2Connections] Return if connection was idle before lease #451

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

Merged
merged 2 commits into from
Oct 2, 2021

Conversation

dnadoba
Copy link
Collaborator

@dnadoba dnadoba commented Oct 1, 2021

Motivation

When we lease a new stream from a connection, we only want to cancel the idle timer if the connection was previously actually idle.

Changes

  • all lease method now return if a connection was idle before the lease.
  • adjust tests to also check the wasIdle flag

@dnadoba dnadoba force-pushed the dn-http2-lease-was-idle branch from 69dc048 to 5015bd3 Compare October 1, 2021 17:51
Copy link
Member

@fabianfett fabianfett left a comment

Choose a reason for hiding this comment

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

Good catch. LGTM.

@dnadoba dnadoba merged commit 9696381 into swift-server:main Oct 2, 2021
@dnadoba dnadoba added the 🔨 semver/patch No public API change. label Oct 4, 2021
@dnadoba dnadoba deleted the dn-http2-lease-was-idle branch October 12, 2021 18:19
@fabianfett fabianfett added this to the HTTP/2 support milestone Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants