mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: Don't raise an error if URL timesout.
This commit is contained in:
@ -91,7 +91,7 @@ class TopicEmbed < ActiveRecord::Base
|
|||||||
response = FetchResponse.new
|
response = FetchResponse.new
|
||||||
begin
|
begin
|
||||||
html = open(URI.encode(url), allow_redirections: :safe).read
|
html = open(URI.encode(url), allow_redirections: :safe).read
|
||||||
rescue OpenURI::HTTPError
|
rescue OpenURI::HTTPError, Net::OpenTimeout
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user