-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot rescue from OpenSSL::SSL::SSLError #118
Comments
Another related question... If I use the sync push, and I add the "on error" callback:
What happens to the main code when there is an exception in the background thread? Does |
Ok, it seems that the call If the APNs certificate is expired (or a similar error occurs), why wait 30 seconds in the |
We're seeing the same behavior, In our case we are using a connection pool, so the issue has an even wider scope:
Thus, any new invocation of the async job will raise Probably the connection should be checked in/shutdown after the error is returned? How can this be achieved? @collimarco the |
update: After some digging, it seems that the issue might be related to
Right now even if |
Hi @mcfoton, If you want to make a pull request to address this it would be greatly appreciated. Apnotic is mostly community supported at this point so that would be the main way for this to get fixed. Thanks! |
Thank you @benubois. |
@benubois @ostinelli I'll see if I can do something about this, though the topic of threads is pretty new to me. Hopefully what I described above is at least the right direction 😌 And just for the record: another unhandled exception that we are seeing is |
We are using this gem with sync pushes: https://github.com/ostinelli/apnotic#sync-pushes
This is the relevant code:
The problem is that
OpenSSL::SSL::SSLError
is not catched byrescue
, as you would expect.Basically the exception is raised, but
rescue
has not effect and therescue
code does not get executed.Is that because we don't set
connection.on(:error)
? Is there any way to raise all the exceptions normally so that therescue
in the above code can work? Or any workaround?Thanks
The text was updated successfully, but these errors were encountered: