diff options
author | Ian Chard <ian@mysociety.org> | 2014-11-03 15:59:26 +0000 |
---|---|---|
committer | Ian Chard <ian@mysociety.org> | 2014-11-03 15:59:26 +0000 |
commit | 5bec0de6a9e98b23918fef207b56d10b3f2fd4df (patch) | |
tree | e410529b740a442d6fc80eb68ffd61150ca9e982 /lib | |
parent | e96e756c43a6b0a81d917a4f093119a51d9a4115 (diff) |
Catch timeouts in quietly_try_to_purge
Although many times of errors are caught, the case where a connection
is made but no reply is received resulted in an uncaught Timeout::Error.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/quiet_opener.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/quiet_opener.rb b/lib/quiet_opener.rb index 16ea27b8e..f39aca82b 100644 --- a/lib/quiet_opener.rb +++ b/lib/quiet_opener.rb @@ -7,7 +7,7 @@ end def quietly_try_to_open(url) begin result = open(url).read.strip - rescue OpenURI::HTTPError, SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ECONNRESET + rescue OpenURI::HTTPError, SocketError, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ECONNRESET, Timeout::Error Rails.logger.warn("Unable to open third-party URL #{url}") result = "" end |