Skip to content

Commit

Permalink
Use the timeout setting in the http request
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Jarvis committed Sep 28, 2015
1 parent c0f66f0 commit 533d4b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions files/external_node_v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ def upload_facts(certname, req)
uri = URI.parse("#{url}/api/hosts/facts")
begin
res = initialize_http(uri)
res.read_timeout = SETTINGS[:timeout]
res.start { |http| http.request(req) }
cache("#{certname}-push-facts", "Facts from this host were last pushed to #{uri} at #{Time.now}\n")
rescue => e
Expand Down

0 comments on commit 533d4b2

Please sign in to comment.