diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-26 16:28:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-26 16:28:28 +0100 |
commit | 3d60708508c6bfc5b6635aff0482d640a5f318ca (patch) | |
tree | 68b99e26b69f93b00c6358668fbe4f9335e735c5 | |
parent | a5c24d5c4d75f3f3144f69c8f60f542707a82584 (diff) |
Fix crash in EmailDomainBlockRefreshScheduler (#17649)
-rw-r--r-- | app/workers/scheduler/email_domain_block_refresh_scheduler.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/workers/scheduler/email_domain_block_refresh_scheduler.rb b/app/workers/scheduler/email_domain_block_refresh_scheduler.rb index c67be6843..e0ad89866 100644 --- a/app/workers/scheduler/email_domain_block_refresh_scheduler.rb +++ b/app/workers/scheduler/email_domain_block_refresh_scheduler.rb @@ -15,7 +15,8 @@ class Scheduler::EmailDomainBlockRefreshScheduler if ip?(email_domain_block.domain) [email_domain_block.domain] else - dns.getresources(email_domain_block.domain, Resolv::DNS::Resource::IN::A).to_a + dns.getresources(email_domain_block.domain, Resolv::DNS::Resource::IN::AAAA).to_a.map { |resource| resource.address.to_s } + resources = dns.getresources(email_domain_block.domain, Resolv::DNS::Resource::IN::A).to_a + dns.getresources(email_domain_block.domain, Resolv::DNS::Resource::IN::AAAA).to_a + resources.map { |resource| resource.address.to_s } end end |