diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-02-09 17:29:41 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-02-09 17:29:41 +0100 |
commit | b963018eec171be99a2658b6ea38ba9f6cb5cb55 (patch) | |
tree | 881bcd1595f2b7d371e72cd5df4e32e10e77726e /lib/gitlab_net.rb | |
parent | 08c8f3085f414c669fd105e4494e2400c03146dc (diff) | |
download | gitlab-shell-b963018eec171be99a2658b6ea38ba9f6cb5cb55.tar.gz |
Actually use the read_timeout config option
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r-- | lib/gitlab_net.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb index 4377005..71e113b 100644 --- a/lib/gitlab_net.rb +++ b/lib/gitlab_net.rb @@ -73,7 +73,7 @@ class GitlabNet http = Net::HTTP.new(uri.host, uri.port) end - http.read_timeout = options[:read_timeout] || READ_TIMEOUT + http.read_timeout = options[:read_timeout] || read_timeout if uri.is_a?(URI::HTTPS) http.use_ssl = true @@ -154,4 +154,8 @@ class GitlabNet def secret_token @secret_token ||= File.read config.secret_file end + + def read_timeout + config.http_settings['read_timeout'] || READ_TIMEOUT + end end |