aboutsummaryrefslogtreecommitdiffstats
path: root/lib/quiet_opener.rb
diff options
context:
space:
mode:
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"