fix error

This commit is contained in:
chiu 2020-04-15 18:40:42 +08:00
parent 9b4eec8a71
commit f78b05cad1
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ namespace :feeds_module do
req = Net::HTTP::Get.new(uri)
http.request(req)
end
if (res_net.code == '301' return true)
if (res_net.code == '301' rescue true)
begin
uri = URI(res_net['location'])
res_net = Net::HTTP.start(uri.host, uri.port,:use_ssl => uri.scheme == 'https',open_timeout: 60,read_timeout: 60) do |http|