Add Errno::ENETUNREACH to exception list in BasicNetworkResolver

Fixes #1621
This commit is contained in:
Alex Sharp 2015-10-05 11:08:52 -07:00
parent 529bcca927
commit 9a529cd294

View file

@ -21,7 +21,7 @@ module Middleman
# Array of Names # Array of Names
def getnames(ip) def getnames(ip)
resolver.getnames(ip.to_s).map(&:to_s) resolver.getnames(ip.to_s).map(&:to_s)
rescue Resolv::ResolvError, Errno::EADDRNOTAVAIL rescue Resolv::ResolvError, Errno::EADDRNOTAVAIL, Errno::ENETUNREACH
[] []
end end
@ -34,7 +34,7 @@ module Middleman
# Array of ipaddresses # Array of ipaddresses
def getaddresses(name) def getaddresses(name)
resolver.getaddresses(name.to_s).map(&:to_s) resolver.getaddresses(name.to_s).map(&:to_s)
rescue Resolv::ResolvError, Errno::EADDRNOTAVAIL rescue Resolv::ResolvError, Errno::EADDRNOTAVAIL, Errno::ENETUNREACH
[] []
end end