A platform for community discussion. Free, open, simple.
DEV: Handle SSL errors in push notification pusher (#22771)
Ted Johanssonf1a43f2319c0
diff --git a/app/services/push_notification_pusher.rb b/app/services/push_notification_pusher.rbindex 736f3ea2bf6..0c6891d8591 100644--- a/app/services/push_notification_pusher.rb+++ b/app/services/push_notification_pusher.rb@@ -157,6 +157,8 @@ class PushNotificationPusherendrescue Timeout::Error => ehandle_generic_error(subscription, e, user, endpoint, message)+ rescue OpenSSL::SSL::SSLError => e+ handle_generic_error(subscription, e, user, endpoint, message)endenddiff --git a/lib/final_destination/http.rb b/lib/final_destination/http.rbindex ffceff99deb..4973b149a33 100644--- a/lib/final_destination/http.rb+++ b/lib/final_destination/http.rb@@ -23,7 +23,7 @@ class FinalDestination::HTTP < Net::HTTP@open_timeout = remaining_timereturn super- rescue SystemCallError, Net::OpenTimeout => e+ rescue OpenSSL::SSL::SSLError, SystemCallError, Net::OpenTimeout => edebug "[FinalDestination] Error connecting to #{ip}... #{e.message}"was_last_attempt = index == ips.length - 1raise if was_last_attempt