diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-08-20 14:58:51 +0100 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-08-20 14:58:51 +0100 |
commit | c0c986ea983c55beff44f835adfcdead8b42ec18 (patch) | |
tree | 4eca5804da3234539940acf9214f786b1af112d0 /lib | |
parent | dae632d5b6a636ee0976151c764831015a67f3d5 (diff) |
ECONNRESET is another error we might get
Diffstat (limited to 'lib')
-rw-r--r-- | lib/quiet_opener.rb | 4 |
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" |