rpush/rpush — pull request #43 by krakatoa (2014-05-28 17:51:21+00:00)
Title: Use check_for_errors as the number of seconds to wait for errors

It think we could manage the Apns's SELECT_TIMEOUT value from Rpush configuration, by using the same 'check_for_errors' setting (without making lots of changes).
In my case, I found it that the conditions of the network (more precisely, the latency between the Rpush service host and Apns service) might lead to problems in the tcp communication. Suppose we need to send A and B notifications to Apns, and that we have the 'check_for_errors' flag set as true. With the current, default, 0.2 seconds, might happen that we send A, and no error is raise. But let's suppose that A notification had some illformed payload, we don't get noticed of that until we send B, and, the worse, it is read as a problem the last notification sent - with B - ...
I couldn't find out a better way of managing that asynchronous communication problem, I will try to dig a bit further to find a better solution. However, I think it anyways is useful to set the time to wait on each notification for errors.

Glad to hear what you think :)