ostinelli / apnotic

A Ruby APNs HTTP/2 gem able to provide instant feedback.
MIT License
477 stars 95 forks source link

Fix to ensure one stream is always available. #82

Closed benubois closed 5 years ago

benubois commented 5 years ago

As discussed in #75, apnotic can block forever if the underlying connection fails. This was introduced in my addition of token-based authentication and this pull request will fix the issue.

When using token-based auth, there is always at least one connection open:

APNs allows only one stream until you post a request with a valid authentication token.

By leaving this connection available, apnotic has the opportunity to repair the connection, and resume sending notifications.

ostinelli commented 5 years ago

Thank you @benubois, sorry for late response. Will review and merge in tomorrow.

ostinelli commented 5 years ago

Merged and released 1.6.0. Thank you.