mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
BUGFIX: no network could mean no posts save.
This commit is contained in:
parent
944cda1f73
commit
03cde003db
1 changed files with 3 additions and 0 deletions
|
@ -30,6 +30,9 @@ class UserAvatar < ActiveRecord::Base
|
|||
end
|
||||
rescue OpenURI::HTTPError
|
||||
save!
|
||||
rescue SocketError
|
||||
# skip saving, we are not connected to the net
|
||||
Rails.logger.warn "Failed to download gravatar, socket error - user id #{ user.id }"
|
||||
ensure
|
||||
tempfile.unlink if tempfile
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue