Fix crash in EmailDomainBlockRefreshScheduler (#17649)

th-downstream
Claire 3 years ago committed by GitHub
parent 5c760fa85e
commit d646f23e5d

@ -15,7 +15,8 @@ class Scheduler::EmailDomainBlockRefreshScheduler
if ip?(email_domain_block.domain) if ip?(email_domain_block.domain)
[email_domain_block.domain] [email_domain_block.domain]
else 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
end end

Loading…
Cancel
Save