Commit 73da0855 authored by Samir Noir's avatar Samir Noir 🧀
Browse files

Set max_retries to 0 instead of 1 (default) when doing http requests

By default, Net::HTTP perform a retry in some case (for example when a
ReadTimeout occures).
parent 5033a9e2
......@@ -101,6 +101,7 @@ module Grid5000
http = Net::HTTP.new(uri.host, uri.port)
http.read_timeout = timeout || 5
http.use_ssl = true if uri.scheme == 'https'
http.max_retries = 0
if tls_options && !tls_options.empty?
http.cert = OpenSSL::X509::Certificate.new(File.read(tls_options[:cert_chain_file]))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment