Merge pull request #1625 from ajsharp/patch-1

Add Errno::ENETUNREACH to exception list in BasicNetworkResolver
This commit is contained in:
Thomas Reynolds 2015-10-05 20:47:19 -07:00
commit 8292bc9899

View file

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