aboutsummaryrefslogtreecommitdiffstats
path: root/lib/quiet_opener.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-08-28 10:45:20 +0100
committerLouise Crow <louise.crow@gmail.com>2012-08-28 10:45:20 +0100
commitee723d9e6645bc7987cb2b7cc9cd320950536201 (patch)
treef5beec1ffc37c9530485c0cd5be15c56210ae2da /lib/quiet_opener.rb
parente98bfd6e9ed7e6bb151d0eb5c216cad0fed6a40c (diff)
parent5c1a88c88ba69cec3924ec8a1d69d8784acaef3c (diff)
Merge branch 'release/0.6.4'0.6.4
Diffstat (limited to 'lib/quiet_opener.rb')
-rw-r--r--lib/quiet_opener.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/quiet_opener.rb b/lib/quiet_opener.rb
index 8cedad250..bde645d0b 100644
--- a/lib/quiet_opener.rb
+++ b/lib/quiet_opener.rb
@@ -5,7 +5,7 @@ require 'net/http/local'
def quietly_try_to_open(url)
begin
result = open(url).read.strip
- rescue OpenURI::HTTPError, SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH
+ rescue OpenURI::HTTPError, SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ECONNRESET
Rails.logger.warn("Unable to open third-party URL #{url}")
result = ""
end
@@ -24,7 +24,7 @@ def quietly_try_to_purge(host, url)
result_body = response.body
}
end
- rescue OpenURI::HTTPError, SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH
+ rescue OpenURI::HTTPError, SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ECONNRESET
Rails.logger.warn("PURGE: Unable to reach host #{host}")
end
if result == "200"