mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -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
|
end
|
||||||
rescue OpenURI::HTTPError
|
rescue OpenURI::HTTPError
|
||||||
save!
|
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
|
ensure
|
||||||
tempfile.unlink if tempfile
|
tempfile.unlink if tempfile
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue