Skip to content

Commit

Permalink
Merge pull request #287 from jiikko/timeout
Browse files Browse the repository at this point in the history
Set HTTPClient timeout
  • Loading branch information
jiikko authored Oct 29, 2020
2 parents 979c213 + 3213e0e commit 0b5a89e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/deploygate/api/v1/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ def post(path, params, &process_block)
private

def client
HTTPClient.new(:agent_name => "dg/#{DeployGate::VERSION}")
timeout = 60 * 5 # 5 minutes
HTTPClient.new(agent_name: "dg/#{DeployGate::VERSION}").tap do |c|
c.receive_timeout = timeout
c.send_timeout = timeout
end
end

def headers
Expand Down

0 comments on commit 0b5a89e

Please sign in to comment.