Skip to content

Commit

Permalink
Set HTTP timeouts to Inf to work around JuliaWeb/HTTP.jl#114
Browse files Browse the repository at this point in the history
  • Loading branch information
samoconnor committed Nov 21, 2017
1 parent 8a74ec7 commit 3741d8c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/http.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ function http_request(request::AWSRequest)
body = FIFOBuffer(request[:content]),
stream = get(request, :return_stream, false),
verbose = debug_level > 1,
connecttimeout = 600,
readtimeout = 600,
connecttimeout = Inf,
readtimeout = Inf,
allowredirects = false,
statusraise = true,
retries = 0,
canonicalizeheaders = false)

catch e
@delay_retry if isa(e, HTTP.HTTPError) &&
!isa(e, HTTP.StatusError) end
@delay_retry if http_status(e) < 200 ||
http_status(e) >= 500 end
!isa(e, HTTP.StatusError) end
@delay_retry if isa(e, HTTP.StatusError) && (
http_status(e) < 200 ||
http_status(e) >= 500) end
end

assert(false) # Unreachable.
Expand Down

0 comments on commit 3741d8c

Please sign in to comment.