Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelbb-upb committed May 10, 2022
1 parent d648012 commit 30ff20d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/curl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function set_low_speed_limits(easy::Curl.Easy, low_speed_limit, low_speed_time)
low_speed_time >= 0 ||
throw(ArgumentError("`low_speed_time` must be non-negative, got $(low_speed_time)."))

_max = typemax(Clong)
_max = typemax(Clong) ÷ 1000
low_speed_limit = low_speed_limit <= _max ? round(Clong, low_speed_limit) : _max
low_speed_time = low_speed_time <= _max ? round(Clong, low_speed_time) : _max

Expand All @@ -182,8 +182,7 @@ function set_connect_timeout(easy::Curl.Easy, timeout::Real)
timeout_ms = round(Clong, timeout * 1000)
Curl.setopt(easy, CURLOPT_CONNECTTIMEOUT_MS, timeout_ms)
else
timeout = timeout  typemax(Clong) ? round(Clong, timeout) : Clong(0)
Curl.setopt(easy, CURLOPT_CONNECTTIMEOUT, timeout)
Curl.setopt(easy, CURLOPT_CONNECTTIMEOUT, Clong(0))
end
end

Expand Down

0 comments on commit 30ff20d

Please sign in to comment.