Permalink
Browse files

a SocketError is fine too

  • Loading branch information...
1 parent fcaaa4a commit 519999498a9f9f3677839891c5388f003fe9de9e @MatmaRex committed Apr 17, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 zb.rb
View
6 zb.rb
@@ -175,7 +175,7 @@ def graph.walk &block
end
end
end
- rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed
+ rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed, SocketError
puts "Timed out while listing categories for #{root}; retrying..."
retry
end
@@ -208,7 +208,7 @@ def graph.walk &block
new_titles = list_of_titles()
user_notif_sett = get_user_notification_settings()
end
- rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed
+ rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed, SocketError
puts "Timed out while downloading list of titles or user settings; retrying..."
retry
end
@@ -260,7 +260,7 @@ def graph.walk &block
puts "Notifying #{ns}:#{page} about #{articles_hash.map{|a| a[0]}.join(', ')}."
notify_user_zb ns, page, articles_hash
end
- rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed
+ rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed, SocketError
puts "Timed out; retrying..."
retry
end

0 comments on commit 5199994

Please sign in to comment.