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: keep connections open #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

chris13524
Copy link
Member

@chris13524 chris13524 commented May 20, 2024

Description

Keeps connections open indefinitely, as per recommendation by APNs docs.

Resolves #86

How Has This Been Tested?

Not tested

Due Dilligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

Copy link

@geekbrother geekbrother left a comment

Choose a reason for hiding this comment

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

Thanks! Totally makes sense not closing connections since we are always pushing to it or expecting to push.

},
signer,
connector,
} = self;
let http_client = HttpClient::builder(TokioExecutor::new())
.pool_idle_timeout(pool_idle_timeout_secs.map(Duration::from_secs))
.http2_only(true)
.http2_keep_alive_interval(http2_keep_alive_interval_secs.map(Duration::from_secs))
.http2_keep_alive_while_idle(http2_keep_alive_while_idle)

Choose a reason for hiding this comment

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

Found a panic during testing. Please include the timer:

Suggested change
.http2_keep_alive_while_idle(http2_keep_alive_while_idle)
.http2_keep_alive_while_idle(http2_keep_alive_while_idle)
.timer(TokioTimer::new())

Choose a reason for hiding this comment

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

I tested with this change and the connection resets have stopped. Thanks again for this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request to send keep-alives on idle connections
3 participants