fix: SocketError: getaddrinfo: for imap channels (#5824)

fixes: #5431
This commit is contained in:
Sojan Jose
2022-11-08 20:23:46 -08:00
committed by GitHub
parent 2e42821c48
commit e2059cfc5b
2 changed files with 9 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ class Inboxes::FetchImapEmailsJob < ApplicationJob
fetch_mail_for_channel(channel)
# clearing old failures like timeouts since the mail is now successfully processed
channel.reauthorized!
rescue Errno::ECONNREFUSED, Net::OpenTimeout, Net::IMAP::NoResponseError, Errno::ECONNRESET, Errno::ENETUNREACH, Net::IMAP::ByeResponseError
rescue *ExceptionList::IMAP_EXCEPTIONS
channel.authorization_error!
rescue EOFError => e
Rails.logger.error e