Improved error handling. Set timeout for http calls.
This commit is contained in:
parent
e5c7fa4c6c
commit
049a35b94c
1 changed files with 3 additions and 0 deletions
|
@ -43,6 +43,9 @@ returns
|
|||
|
||||
http = Net::HTTP.new(uri.host, uri.port)
|
||||
|
||||
http.open_timeout = 8
|
||||
http.read_timeout = 8
|
||||
|
||||
if uri.scheme =~ /https/i
|
||||
http.use_ssl = true
|
||||
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||
|
|
Loading…
Reference in a new issue