Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set upper bound on device token sleep interval after HTTP errors (#216)
Section 3.5 of RFC 8628 requires a polling backoff in response to HTTP connection timeouts. However, doubling the interval each time can quickly lead to an effectively infinite backoff, which is undesirable. This change adds a configurable max backoff interval to use in cases of HTTP client errors (which may be due to a variety of causes, including connection timeouts). The default is 10 seconds (twice the default polling interval of 5 seconds defined in RFC 8628), which attempts to strike a balance between user experience and server load. Fixes #214.
- Loading branch information