Skip to content

Commit

Permalink
In Feed#ping_hubs, rescue a network error and simply log it instead o…
Browse files Browse the repository at this point in the history
…f crashing

This won't alert users if pinging the hub has failed; but there's not much they could do about it anyway. Another motivation for this change is developing offline; before this change, updating your profile would crash the whole app if the hubs couldn't be reached.
  • Loading branch information
carols10cents committed Sep 26, 2012
1 parent 7b26acd commit 44a7190
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/feed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def populate_entries(os_entries)
def ping_hubs
feed_url = url(:format => :atom)
OPub::Publisher.new(feed_url, hubs).ping_hubs
rescue SocketError => e
logger.error "Feed#ping_hubs error: could not reach hubs; check the network connection."
end

def local?
Expand Down

0 comments on commit 44a7190

Please sign in to comment.