relayrides/pushy — pull request #116 by jchambers (2014-09-05 20:39:34+00:00)
Title: Close connections when inactive

This is the first part in a series of changes to work around the inability to determine the state of an APNs connection. Because we can't determine if a channel is "alive" or not except by sending a known-bad notification (thereby closing the connection), the big idea is to close connections more frequently. In this pull request, we allow connections to close after a user-configurable period of inactivity.

One consideration here is that, if a push manager is completely idle, it might just sit there opening and closing connections at regular intervals. That seems pretty okay, to me, though.