From 3741d8cb5dea5cd9121e9c835418a1affb7da480 Mon Sep 17 00:00:00 2001 From: Sam O'Connor Date: Tue, 21 Nov 2017 13:42:31 +1100 Subject: [PATCH] Set HTTP timeouts to Inf to work around https://github.com/JuliaWeb/HTTP.jl/issues/114 --- src/http.jl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/http.jl b/src/http.jl index 67b11f5..217a9c3 100644 --- a/src/http.jl +++ b/src/http.jl @@ -26,8 +26,8 @@ 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, @@ -35,9 +35,10 @@ function http_request(request::AWSRequest) 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.