Skip to content

Commit

Permalink
use idle_timeout for the requests
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Mar 30, 2018
1 parent efef36f commit 8be5b51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/requests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ function github_request(api::GitHubAPI, request_method, endpoint;
_headers = convert(Dict{String, String}, headers)
!haskey(_headers, "User-Agent") && (_headers["User-Agent"] = "GitHub-jl")
if request_method == HTTP.get
r = request_method(merge(api_endpoint, query = params), _headers, redirect = allowredirects, status_exception = false)
r = request_method(merge(api_endpoint, query = params), _headers, redirect = allowredirects, status_exception = false, idle_timeout=20)
else
r = request_method(string(api_endpoint), _headers, JSON.json(params), redirect = allowredirects, status_exception = false)
r = request_method(string(api_endpoint), _headers, JSON.json(params), redirect = allowredirects, status_exception = false, idle_timeout=20)
end
handle_error && handle_response_error(r)
return r
Expand Down

0 comments on commit 8be5b51

Please sign in to comment.