Improved error handling. Set timeout for http calls.

This commit is contained in:
Martin Edenhofer 2015-02-16 13:40:10 +01:00
parent e5c7fa4c6c
commit 049a35b94c

View file

@ -43,6 +43,9 @@ returns
http = Net::HTTP.new(uri.host, uri.port) http = Net::HTTP.new(uri.host, uri.port)
http.open_timeout = 8
http.read_timeout = 8
if uri.scheme =~ /https/i if uri.scheme =~ /https/i
http.use_ssl = true http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE http.verify_mode = OpenSSL::SSL::VERIFY_NONE