summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-24 21:21:58 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-24 21:21:58 -0300
commit30794972f46de4d3af1c3f1843d46f1162660c3e (patch)
treea7122fd3589846110eadb11912886f65b4076db3
parent5d106f2597bb009f0e7b8d5ed02b6f2206237e7e (diff)
downloadgitlab-ce-30794972f46de4d3af1c3f1843d46f1162660c3e.tar.gz
Set timeout options to the Github::Client
-rw-r--r--lib/github/client.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/github/client.rb b/lib/github/client.rb
index bf1b2b0a523..e65d908d232 100644
--- a/lib/github/client.rb
+++ b/lib/github/client.rb
@@ -4,6 +4,8 @@ module Github
def initialize(options)
@connection = Faraday.new(url: options.fetch(:url)) do |faraday|
+ faraday.options.open_timeout = options.fetch(:timeout, 60)
+ faraday.options.timeout = options.fetch(:timeout, 60)
faraday.authorization 'token', options.fetch(:token)
faraday.adapter :net_http
end