From 9a529cd29403ae0ef74653243e6c07ce668c0cb6 Mon Sep 17 00:00:00 2001 From: Alex Sharp Date: Mon, 5 Oct 2015 11:08:52 -0700 Subject: [PATCH] Add Errno::ENETUNREACH to exception list in BasicNetworkResolver Fixes #1621 --- .../lib/middleman-core/dns_resolver/basic_network_resolver.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleman-core/lib/middleman-core/dns_resolver/basic_network_resolver.rb b/middleman-core/lib/middleman-core/dns_resolver/basic_network_resolver.rb index 11dc3096..f4b90deb 100644 --- a/middleman-core/lib/middleman-core/dns_resolver/basic_network_resolver.rb +++ b/middleman-core/lib/middleman-core/dns_resolver/basic_network_resolver.rb @@ -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