-
Notifications
You must be signed in to change notification settings - Fork 55
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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:
.http2_keep_alive_while_idle(http2_keep_alive_while_idle) | |
.http2_keep_alive_while_idle(http2_keep_alive_while_idle) | |
.timer(TokioTimer::new()) |
There was a problem hiding this comment.
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
just following up if we are merging this in the mainline |
@rajesh-blueshift we'll definitely merge this, we've just been super busy with other things. Feel free to use a Git dependency in the meantime, but would love to merge this soon |
Description
Keeps connections open indefinitely, as per recommendation by APNs docs.
Resolves #86
How Has This Been Tested?
Not tested
Due Dilligence