Add open_timeout (#2555)

This commit is contained in:
Mitsutaka Sato 2021-03-04 11:41:10 +13:00 committed by GitHub
parent ba0ec6ba71
commit 779b41a64a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -111,6 +111,7 @@ module ApplicationHelper
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = (url.scheme == "https")
http.read_timeout = 10
http.open_timeout = 10
http.start do |web|
response = web.head(url.request_uri)