]> cat aescling's git repositories - mastodon.git/commitdiff
Rescue SSL errors when processing mentions, remove useless line (#7184)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 18 Apr 2018 22:53:31 +0000 (00:53 +0200)
committerGitHub <noreply@github.com>
Wed, 18 Apr 2018 22:53:31 +0000 (00:53 +0200)
app/services/process_mentions_service.rb

index 8e285e1f736dcb1ab4d078734ff58e90934b1273..dc8df4a9ae681e8566cb7d67ad1e50b09b88367c 100644 (file)
@@ -17,13 +17,11 @@ class ProcessMentionsService < BaseService
       if mention_undeliverable?(status, mentioned_account)
         begin
           mentioned_account = resolve_account_service.call($1)
-        rescue Goldfinger::Error, HTTP::Error
+        rescue Goldfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::UnexpectedResponseError
           mentioned_account = nil
         end
       end
 
-      mentioned_account ||= Account.find_remote(username, domain)
-
       next match if mention_undeliverable?(status, mentioned_account)
 
       mentioned_account.mentions.where(status: status).first_or_create(status: status)