I assume I am somehow getting in my own way here, but would appreciate any advice that you can provide.
I am currently using the recommended connection.on(:error) do |exception| callback to catch socket errors and re-attempt sending push notifications using .push_async. These exceptions are fairly common in my setup, usually due to a DNS resolution error or closed connection. I am not using a background worker like DelayedJob or similar.
The problem I am experiencing is that .push_async blocks when I attempt to resend a notification. The apnotic documentation states that the underlying connection will be automatically repaired, but this does not seem to be the case. Perhaps this is only in the context of a background worker engine that causes the connection object to be completely reinitialized?
One additional note: I am not using a ConnectionPool currently, though I do not believe this affects the situation one way or the other.
I assume I am somehow getting in my own way here, but would appreciate any advice that you can provide.
I am currently using the recommended
connection.on(:error) do |exception|
callback to catch socket errors and re-attempt sending push notifications using.push_async
. These exceptions are fairly common in my setup, usually due to a DNS resolution error or closed connection. I am not using a background worker like DelayedJob or similar.The problem I am experiencing is that
.push_async
blocks when I attempt to resend a notification. The apnotic documentation states that the underlying connection will be automatically repaired, but this does not seem to be the case. Perhaps this is only in the context of a background worker engine that causes the connection object to be completely reinitialized?One additional note: I am not using a ConnectionPool currently, though I do not believe this affects the situation one way or the other.