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

Add timeout option if connection does not receive response. #101

Merged
merged 1 commit into from Feb 1, 2021

Conversation

madsodgaard
Copy link
Contributor

This PR provides a work-around for when Apple servers does not return any response, and therefore leaves the connection occupied and blocked. This means in production environments, with 2 connections you are forced to restart the server, if two attempts to send a push notifications hangs because of Apple. This actually happens pretty frequently.

The timeout is disabled by default and can be enabled by setting the timeout property of APNSwiftConfiguration.

I've tested this in our production environment, and fixes the issues we were having with the connections blocking.

@kylebrowning
Copy link
Member

@madsodgaard thank you so much, this is tremendously helpful.

@kylebrowning kylebrowning merged commit 03e83e2 into swift-server-community:master Feb 1, 2021
@emland89
Copy link

wow thank you. We were having this same issue, restarting the server like every 30 min is not fun, thanks for this. Any ideas as to why apple may not be returning anything?

@zastrozzi
Copy link

I'd like to give this a +100. Thank you so much.

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.

None yet

4 participants