Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Add param for read response timeout setting (#1588)
Browse files Browse the repository at this point in the history
* Add param for read resp timeout setting
  • Loading branch information
banuchka authored and mssola committed Jan 15, 2018
1 parent 9b821bc commit 56d2886
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ registry:
timeout:
value: 2

#Set timeout in seconds for read response from registry.
read_timeout:
value: 120

# The FQDN of the machine where Portus is being deployed.
machine_fqdn:
value: "portus.test.lan"
Expand Down
3 changes: 2 additions & 1 deletion lib/portus/http_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def parse_unhauthorized_response(res)
def get_response_token(uri, req)
options = {
use_ssl: uri.scheme == "https",
open_timeout: APP_CONFIG["registry"]["timeout"]["value"].to_i
open_timeout: APP_CONFIG["registry"]["timeout"]["value"].to_i,
read_timeout: APP_CONFIG["registry"]["read_timeout"]["value"].to_i
}

Net::HTTP.start(uri.hostname, uri.port, options) do |http|
Expand Down

0 comments on commit 56d2886

Please sign in to comment.