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

How to close idle connection #791

Open
cyflhn opened this issue Jun 19, 2020 · 4 comments · May be fixed by #1048
Open

How to close idle connection #791

cyflhn opened this issue Jun 19, 2020 · 4 comments · May be fixed by #1048
Milestone

Comments

@cyflhn
Copy link

cyflhn commented Jun 19, 2020

There is a option to configure maximum connections for a apns client, but it seems that there is no option to configure how to close a connection which is idle for long time. Is there any method to meet this requirement?

@jchambers
Copy link
Owner

There isn't currently a way to close idle connections. We can call this a feature request. Can you explain your use case a little more? How many connections do you have, and why is it important to close the idle ones?

@cyflhn
Copy link
Author

cyflhn commented Jun 20, 2020

We need to send notifications to many apps. If we have 10 apps, we need to create 10 apns clients. As the number of apps increase, the number of concurrent connections also increase. We have limit number of concurrent open connections on our server, so we need to close those connections which are not used for long time as soon as possible.

@jchambers
Copy link
Owner

Pardon the delay. I'll think about this as we move toward multiple credential sets per client, but I don't plan to add this as an independent feature in the near term (i.e. not in the 0.14 series).

@jchambers jchambers linked a pull request Jan 15, 2024 that will close this issue
@jchambers
Copy link
Owner

I've proposed a change in #1048 that will simply close connections when they're idle (instead of sending PING frames to keep them open).

@jchambers jchambers added this to the v0.16.0 milestone May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants