lib/nfagent/client.rb in nfagent-0.9.6 vs lib/nfagent/client.rb in nfagent-0.9.8

- old
+ new

@@ -4,10 +4,10 @@ def self.post(end_point, data_hash) proxy_class = Net::HTTP::Proxy(Config.proxy.host, Config.proxy.port, Config.proxy.user, Config.proxy.password) # TODO: Enable SSL proxy_class.start(SERVICE_HOST, 80) do |http| - http.read_timeout = 240 # 4 minutes TODO: Make this a config option with 240 as default + http.read_timeout = 120 # 2 minutes TODO: Make this a config option with 120 as default req = Net::HTTP::Post.new("/#{end_point}") req.set_form_data(data_hash.merge("key" => Config.client_key)) ClientResponse.new do |resp| resp.response, resp.message = http.request(req) end